Yeah, except that the going rate for a good junior developer in SV is about $150k (Google, Facebook) and in Romania it's $20k. I recently moved away from Romania because while I could find a job in Western Europe paying more than $100k, there was no way to find something in Romania (or remote) paying even 30% of that. And not for lack of trying.
Also, $300k a year in SV is much more achievable than $100k in Romania or Bulgaria, and with that sort of money you start caring about other stuff than housing (luxury goods, exotic vacations, investments etc.) whose stuff doesn't depend on location.
You can afford none of these earning $100k in SV, but most of these earning $30k in Bucharest or Minsk.
Of course if you are after material goods, the opposite is true - if you don't care about a nice house but want a new Tesla, a new iDevice every year, Hermes bags and a Cessna instead, then you are better of living in a flatshare or a shoebox in San Fran or the Valley.
The fact that you would not have the same position abroad (i.e. your cash savings are large locally but small if you lived in a rich country) is not a loss of any kind, it's just a fact that has no bearing on daily life.