value of house + value of rest of economy.
Now someone foreign comes into the country to live there and work in tech from abroad. They buy a house. Now the wealth inside the country looks like this:
value of house + foreign money paid for house + value of rest of country.
You can see that the wealth inside the country has increased. If it is the middle class owning those houses, then the wealth of middle class has changed by the difference in value between the value of the house and what it was sold for. The middle class then further benefits from whatever money the foreign worker spends in the country, which is a net gain for the middle class, plus the injection into the economy of the foreign money paid for the house. The only way the middle class end up worse off here is if the foreigner doesn't live and work here, and is just a foreign landlord (siphoning money out of the country) -- which is something I think we can both agree is detrimental.
I will say here in the US people have a lot of problems with foreign landlords and people who buy property here and don't live here. But only the most backwards rednecks have serious issue with an honest foreigner who buys a normal middle class house to live their lives, especially if they are injecting foreign capital into our economy.
Sorry but since you make no distinction between someone owning and selling a house ($500k asset in Austria) and someone who doesn't own a house and call them both middles class is just plain wrong.
The property owner middle classer is significantly better off than than the other and would benefit even more from your intention of buying while the other middle classer is worse off without a property to his name and will suffer more from being in competition with you.
Sure, one guy profits, but you can't possibly tell me with a straight face someone else doesn't get screwed from this wealth driven game of music chairs which is the property market right now.