Right, but things with fixed supply make perfect investment vehicles, and when people investment in real estate that is speculation.
Imagine if the stocks of public companies were not fixed in supply. The company at any time could simply decide to have shares for 200%, 300%, or 1000% without compensating existing shareholders in any way. If that was the case, stocks would be total garbage as an investment. Prices would plummet to 0.
The reason metro real estate is so attractive as an investment is because supply is inelastic. If we want to encourage usage, as oppose to hoarding, we should do like we do with fiat currencies and allow more of it to be made.
Banning foreigners might have some tiny effect, but honestly seems a bit like arranging deck chairs on the Titanic. We can check in after a year, but all my money is on Auckland continuing to have an expensive housing market (unless they allow more rezoning). Further, banning foreigners of course is also banning a valuable export and will cut off a stream of foreign money that was previously flowing into the local economy.