Two minutes after the confusion, Timo Werner headed home to double Germany's advantage to 2-0 and the RB Leipzig striker netted again after Vincent Aboubakar pulled a goal back for the Indomitable Lions in their 3-1 defeat in Sochi.
However, substitute Martin Rodriguez's first worldwide goal spared Chile's blushes and, as expected, they followed Germany out of Group B and through to the next round.
Both teams had chances to win it, with Vargas heading wide from six yards out and Ryan McGowan missing from similar range at the other end - but in the end a draw seemed a fair result and it secured second spot for Chile, who will play Portugal in the semi-finals on Wednesday.More news: Transformers Top[s Box Office But Ultimately Disappoints
More news: 'Transformers: The Last Knight' debuts to a franchise low
More news: It's on: Mayweather to fight UFC star McGregor Aug. 26
Werner then gave Germany a two-goal cushion with a diving header, his first goal at senior global level, from Joshua Kimmich's cross on the right wing.
In Tim Cahill's 100th match for Australia, the Socceroos played a high energy, fast-paced, attack-minded brand of football that combined Ange Postecoglou's football vision with the long-time characteristics of Socceroo teams of yesteryear.
Demirbay carried the ball to the edge of the box following Julian Draxler's neat flick and smashed a right-footed shot into the top corner.
Troisi's 42nd-minute goal put the pressure on Chile, which responded well and would have equalized through Vidal just before the break, but for Dylan McGowan's last-ditch block.
Benjamin Henrichs then set up Werner for his second goal, cutting the ball back for a straightforward finish to make sure of Germany's win.
"I have to say I am very proud and full of praise for the team for reaching the semi-finals", said Loew. "We see the proof of that, that there's a lot still to be done".