Well - I can agree that the flags are really not "relevant" - but I just finished playing through XCOM2 and in my head the soldiers are "Kobe - the sniper from Japan", "Jojjo - the heavy weapons guy from Sweden" etc. Having said that I agree that it can be in the soldier detail panel below when selected - but there it does make sense for many I think for that "bond" to the soldiers. When you look at some sniper the name "Aerts" may not connect - but with the flag from Belgium next to it you remember who it is... For me at least that works very well for adding immersion in some strange way.
But - I did another proposal for the sake of it. Don't want to get rid of the names as it just becomes a bunch of numbers otherwise. Zlatan, the sniper from Sweden will not get number 4 every time so with two snipers in the team they become very anonymous... Often in XCOM2 at least I always knew that Jojjo (the heavy weapons guy from Sweden) carried some special grenades etc - so you want to find him and not the other guy.
With the new proposal below I removed the M16 icon that takes way too much space. Just did some quick "icons" for infantry with chevrons, bullets for heavy, circle for shotgun (not happy with that) and crosshair for sniper. In 10 minutes so yes they are there for the idea And with this proposal there is even less space for the name - but I would like the option that XCOM2 has with "nicknames / callsigns". That way you can have a nickname limited at 8 characters and call them "Jojjo" or similar (he had a longer real name I don't remember).
Edit - adding the way it looks right now in the Alpha below for comparison...