Shelters are not homes. If you don't have privacy, a right to who is allowed into the space, the ability to store your possessions, to have pets, etc., you're homeless, and having an indoor bed to sleep on doesn't solve that. HN people who have never experienced housing insecurity in their lives will wax poetic about how many homeless turn down help because they turn down shelters, but this is a totally wrong, ignorant, and compassionless take. Homeless people turn down shelters because for many homeless, shelters aren't help--they're worse than sleeping on the street. Shelters are at best a mild alleviation of suffering for those homeless for whom the tradeoffs of living in a shelter are worth it.
The solution to homelessness is not mental health services: mental health services are totally ineffective when one is suffering the ongoing trauma of homelessness. Mental health services are a much needed measure to prevent people from becoming homeless in the first place, but they're utterly ineffective in getting people who are homeless into homes.
The solution to homelessness is homes. Period.
The fact is, if we gave homes to the homeless, it would drive down the prices of housing, and that would hurt the pocketbooks of people with power and money. That's why no money is being invested into solving homelessness. Until we as a society stop blindingly trusting rich people to be benevolent, this problem (and any other problem which rich people benefit from) will not be solved.