If the market worked, you'd see people building multi-family units everywhere until supply caught up with demand, and then you'd see a huge crater in prices as people who took a bath on real estate speculation were overrun with the resulting supply glut. This doesn't happen, for a host of various reasons. Governments want housing to be simultaneously affordable and an investment, which is impossible. Hence most cities wind up building a sort of shadow immigration system, through rent control, selective property tax moratoriums, and so on. People who have lived in a city all their life enjoy lower rents, subsidized by people who just moved in and have to buy at market rate.
There are other factors, of course. Just speculation does not really seem to be a major one.
$70k-150k up-front isn't easy to save up for even above-average earners (remember, these are average home prices, not luxury homes), so anyone earning average or below is forced into either renting forever, or moving to another town.
Maybe if I put down one million and borrow another 300k, I can get a low mortgage. But I also lost one million.
It's a pity if a flat is empty for a year, but that in itself also does not cause a shortage. After all, it was rented out after a year.
The market is supposed to deliver the flat to the person who needs it most. In that case, apparently it was you. Without the speculator, somebody would have rented it for a very low price long ago, and you would not have been able to live there at all. So maybe the market worked.