National flags are not in general a very good way of labelling languages. There are far more languages in the world than countries. In any case, since people are looking for a language they understand it's good enough to write each language name in the corresponding language, like Wikipedia does (wikipedia.org).
But that's not the question, anyway. The question is how to label the button that lets the user change the language when the user might not understand the current language at all. Perhaps a big bright "?" ...?
National flags are actually a very good way of labeling languages for two reasons: first and most important, almost everybody already understands that a flag-looking icon (or two-flags-stacked-on-each-other icon) is used for switching languages. That's already a very strong practical reason to use them. Second, for like 70% of the most popular languages there are flag assignments that won't mortally offend the speakers of those languages — maybe they'd rather see a different flag but generally they'd grumpily agree that "guess it conveys the intent good enough, whatever, I've managed to chose the actual language I want to use".
You can't trust that flags will be available, and you open yourself up to political/territorial disputes.
Windows doesn't render the Unicode flags (likely due to maintenance and territorial disputes).
Mainland Chinese iPhones don't render the Republic of China flag
Would you use the current Afghanistan flag, or the Taliban flag for Pashto (Afghani)?
Some languages don't have recognisable flags (our translation platform doesn't have a flag for Cantonese)
Flag to language is a many to many mapping. My Android lists ~107 available languages under 'English'.