Maybe if you just look at gross numbers. It's the old GDP vs happiness as an index for a country's rank debate.
I worked for a multi-national in Berlin; heading a team of 40 internals and another 40 externals, the latter mostly in Ukraine.
As a director I saw the salaries of everyone working under other directors under the same VP. Including the teams in Chicago and San Diego. Salaries were maybe 10-15% lower in Berlin.
We regularly swapped developers around. Usually for six months. People from both CA & IL that came to live in Berlin with their families were always overwhelmed about quality of life in here. Particularly the food. Well, then they fly to Italy over the weekend (affordable, with their spouse & kids, mind you) and they are completely blown away.
If you look at net salary and what it buys you, quality of life, quality of food, healthcare, rent, 20 days/y of paid holidays (+12 paid public holidays in Berlin, more if you live in a state with a Catholic majority ofc.), 6 months (unpaid) unconditional sabbatical after you complete five years with that company, job security because of German laws. The list goes on.
On these measures the US sucks compared to most of Europe. Compared to Germany for sure.
I pay 1,250 EUR/month for a bright, 1075 sqft apartment in the very center of Berlin. The city surely is one of the cheapest capitals in Europe but still.
From my friends in SF or Boston who work in tech, earn more (gross) than me and who visit me from time to time I always hear they're jealous about the quality of life we have here.
I was an expat for 15 years working in India, Australia, Asia and the UK. During the last five years I was on business trips to the US every 2-3 months. Affordable food sucks, good food will cost you $$$ and you can't get it just in any supermarket like here.
I have only one body. What do I care if I make 30% more and live 10 years less to enjoy it?
Being back on the continent for another decade now I know I made the right decision. The only country I lived in with comparable quality of life in many aspects (and even better health care) is Japan.
Finally, in software location is a non issue when you want to start a business. You can shop for money anywhere and you can set up the business where it is convenient, e.g. for tax reasons or access to investors.
I had a software company in Hong Kong seven years ago. I was in Europe most of the time. The team was from all over the planet.
My experience is that if investors want to meet f2f they actually love if you're in Europe as they have an excuse to fly there and meet you.
One of my best friends who's Mexican co-heads a big home delivery SaaS that is growing at crazy pace. He bought a flat here. His workplace is a modest desk in a rather mediocre co-working space in the center of Berlin.
He also bought a flat in Austin, TX. But he only goes there maybe for one month/year. Because ... quality of life. It trumps salaries every time ... if you have understood what it truly means to be human.