The England-Germany clash at Wembley on June 29 is the marquee clash, while Portugal take on world No. 1 ranked side Belgium in another heavyweight duel.
Ronaldo equalled the world record 109 international goals scored by Iran's Ali Daei -- ensuring that the defending European champions scrambled into the knockout phase with a thrilling 2-2 draw against France.
Goretzka's strike provided Germany with the late life-line.
Spain finished second in Group E on five points behind Sweden.
Sweden sent Poland home from the European Championship with a stoppage time winner to make it 3-2 in one of the tournament's most exciting games.
England delivered an efficient but hardly scintillating display to beat the Czech Republic 1-0 with an early Raheem Sterling header.
Second-half goals from Luka Modric and Ivan Perisic helped Croatia book their spot in the knockout phase.
Munich mayor Dieter Reiter had said he wanted to light up the stadium in the colours in protest against a new law in Hungary that bans the dissemination of content in schools deemed to promote homosexuality and gender change.
Denmark will meet Wales in the last 16 in Amsterdam on Saturday.
Belgium, who became the third team after Italy and the Netherlands to win all three group games, will face one of the third-placed sides in the round of 16 on Sunday.