This happened to us once at Munich airport. We were a group of fifty corporate members who were travelling from Delhi to SFO via Munich. But our flight got delayed at Delhi itself, and while the connecting caught might have been delayed twenty minutes to accommodate out group, Lufthansa simply chose to ignore this knowing the next flight out to SFO was not until 24 hrs later. We were stuck at the airport. Without visa and could not go out. They provided temporary bedding at a terminal gate for fifty of us. The Munich airport shuts down at night, and they even switched off the heater, so we had to sleep in cold while it was snowing outside. There was nobody at the airport except few of us who we could have reported this to. We took the next flight out to SFO the next day.
So to answer your question, nobody can just exit into a country whatever the case may be. The evacuation too would happen towards inside of the airport than out to the city. If you want to know exactly what happens in such a case, I would recommend you watch Tom Hanks going through this scenario in the movie 'The Terminal'.