> Anecdotally most of my friends in Latin and South America live upper middle class on software salaries
And your North American friends do not? Please.
The commonality is that software engineers all across the globe live pretty great, compared to their local peers. But of course, compare them to inflated NYC/SV salaries and everything looks like peanuts.