>Blaming it 100% on foreigners is a smokescreen.
Only a vocal few are 'blaming it 100% on foreigners'. I say this as a foreigner in NZ.
What is recognized and being responded to here is that foreign investment in property/land in NZ is A factor contributing to the current housing bubble in the country. A factor. One factor. Not the factor.
How much of a factor? Difficult to establish since there has been wilful obfuscation of the facts. Right now the gathered official information on foreign property market activity in NZ puts it at anywhere from 3% to 57%. Yes, the data really is that flawed and it's likely not an accident.
Alongside this is a high rate of immigration (this is different from foreign investment land/property holdings, but the two do intertwine especially when it comes to properties being purchased by overseas students on temporary visas, which appears to be fairly widespread).
That's about it as far as factors that the racists and anti-racist racists can jump on board and shout about. Another factor is the geographic realities of NZ (while Auckland's low building height zoning seems unnecessary, it's very much a necessity for most of the rest of NZ which is one of the most earthquake-prone regions of the world).
Yet another factor is the expense and complications of constructing new housing stock here. First, the country's remoteness means a great deal of materials required must be shipped great distances and this costs both dollars and time. Second, there is a stranglehold monopoly on the supply of many building materials wherein a single corporate entity has managed to lobby for esoteric compliance requirements for said materials, to the point that they are functionally the only possible provider of said materials. Third a great portion of the building workforce has been tied up with the Christchurch rebuild (that little thing six years ago that pretty much levelled the third largest city in the country). This drove a reduction in workforce, materials and equipment availability for the rest of the country and so development has been consequently slower since. That rebuild is by no means complete.
Finally, zoning is not as simple as 'just do it'. Aside from the tectonic risk mentioned earlier, New Zealand maintains high percentages of protected green areas within it's cities, and aside from the aspirational and cultural reasons behind this, it's a important element of maintaining the country's overseas reputation as a clean, green tourism destination. Since that's 4% of GDP here (9% if you count the downstream stuff), it's important to maintain it, and chucking up dense residential, commercial, or industrial actively harms that reputation and will reduce GDP. On top of this, you can't simply change zoning and expect infrastructure to keep pace. It must be built to accommodate higher density and then the higher density can follow. As mentioned earlier, NZ's remoteness is a significant barrier to the kind of infrastructure investments required (and ten plus years ago too, if you want to look at solving the problems of today).
So, this is just a slice of what is a very complicated situation. I have by no means covered all the major factors above, just a few. This move to reduce foreign property speculation in NZ is sound, but only part of the picture. With any multi-faceted economic issue the impacts may not be exactly what is desired and the second-order effects of this might bring things that are even worse.