So the idea of "investing" is not purely speculatory.
I live in Washington, D.C., which could very well lose a substantial portion of its population permanently. I suspect we will be underwater on our mortgage at some point in the next few years, and would be surprised if in the next ten we experienced any increase in wealth attributable to buying rather than renting.
But it's not a lie if the majority of people do it.
the building is consumed. But housing is more than just the building - the location is also part of said "housing". Location doesn't get "consumed". And in fact, it is the location that appreciates (while the building itself does depreciate over time).
The investment is not in the building (tho you do pay for it - minus the depreciated portion i suppose, if you're a savvy buyer). It is in the location.
> "Housing can either be an investment or affordable."
This an important point although I'd describe it slightly differently
> Housing can either be a speculation backed by NIMBY or affordable.
In general parlance, an investment is something you buy that makes you money. I think this terminology is overly broad. In economics, capital is something that helps you produce something else, e.g. tools and locations to produce. The proper price of capital is tied to the returns on investment over time. Usually when economists talk of investment, they are talking of capital purchases.
Housing (e.g. a house, apartment, condo etc) is an asset, but it doesn't really do the thing that most capital does because -- much like food -- past the basics to live it is a lifestyle consumption good. Housing is consumed as you live in a place, the wear and tear that occurs. We produce more as we repair housing or build new ones. But the housing doesn't really provide a return, unless you sell it to others through renting.
When people are told to "invest" in a house, they are being encouraged to purchase _and speculate_ on their own consumption good. This speculation is based on the assumption the price will go up, not that you will earn a stream of payments because it improves your ability to produce. The only way for this asset to grow in value is for the supply to be artificially constricted.
So the fact that people have been sold an investment lie and tie up so much of their wealth in it leads to exactly the political results you have pointed out.