I think the biggest challenge is there are two types of homeless people broadly speaking, who require two different solutions:
Group A is the working people or those down on their luck who are priced out of housing near reasonably vicinity due to lack of affordable housing supply be it gentrification, zoning policies, income not keeping pace, housing investors speculating, etc. The gap is they need housing geared towards their income, which is addressed simply through investing in supply targeted towards the demographic for affordability through government subsidized efforts. This really just really requires money, and political will to invest the money.
Group B is the people with mental health or substance addiction problems who are unhoused because their disruptive behaviour results in a lack of means to be housed or the ability to remain in housing if provided with one. The gap here is this group first needs professional treatment for the root cause of their behavior, but in western countries that requires their consent, which is not really forthcoming. You cannot just round them up and send them to the psych ward or the detox facility even if sufficient resources existed since that would be involuntary confinement. They need tough love, but unfortunately the rules and regulations prevent societal intervention on that scale (families may be able to intervene on an individual level). No matter how well intentioned the efforts of social workers and others, this group will remain unhoused unless active professional health interventions are taken. This group requires actions that take far more political will and restrictions on civil liberties, in addition to money.
Fundamentally, this is a political/cultural debate. Should reasonable housing (whatever that is defined to be) be available to all citizens at a price they can afford as a basis of society and secondly, should people be allowed to live however they wish, even if it means ruining themselves or should there be a line where that freedom is curtailed and societal intervention be taken.
I agree with you on your assessment about type A and B. However;
The case of A (regular people), stem from a chronically poor labour market. Deindustrialization in the United States has created a rising low wage market that has replaced good industrial jobs. In 2018 the richest 88% earned of all income.
Thus, half of Americans earn only 12% of the income. If you look at level of education between 25-30 years old (US, stats; 2018) you find that 93% of American hold a high school diploma, 47% a associate degree and 37% a college degree. Americans have more education than ever before but education (with some exception for key professional degrees) do not lead to professional jobs. What we see is a "College to McDonalds" trend. Even in the late 1960s data conclude that mass-education eventually would lead to a saturation of University educated skilled labor.
Until 1976 Americans could default on a student loan debt. It was treated as any other debt. A new bankruptcy law was introduced as to many applied for bankruptcy. Instead of abolishing student loans all together - student loans became more common with rising tutition fees. Many European countries have tutition free college. Still, Europeans cannot repay their debt (taken out for housing, books and living) as a college degree do not lead to a professional job but a low paid menial job requiring little or no education. Hence, in the United States and across Western countries workers income do not rise relation to the rising cost of living. To a large extent it´s driven by increased cost for housing. If your career is working McDonalds you are not going to be able to pay your rent.
Public Housing was introduced in early 1900 and than became more common from the 1930s throughout 1970s to solve house poor people. These "projects" turned into social dumping spot. Public housing have failed everywhere. Nordic countries introduced a better solution to public housing. You can apply for grant instead if you income is to low to pay your rent. Still, should government subsidize housing costs? Would it not be better to raise peoples income so they can afford housing?
Developing countries in Africa, Asia and Latin-America need public housing together with infrastructure (roads, sewage, water treatment plants, stable energy and so on). Western countries need to create jobs with living wages. This is something the elites in the West do not want of course.
Regarding B. The rising number of people with mental illness and drug addiction can
in part be explained by a growing number of normal people, that because of social conditions, fall into it. Unemployment and underunemployment tend to lead to an increased risk of physical and mental illnesses. Often people turn to drugs and alcohol. It also causes other social problems such as divorce. These social problems are later inherited by the children.
So what to do? Well, there a realistic and unrealistic solutions. Grants are no doubt better than public housing. However, there need to be political, ethnic, religious and social cohesion to solve these rising social issues in the West. There have to a high sociotal social capital, reciprocity and solidarity. Because "elites" has changed Western societies into multi-ethnic balkanized neo-liberal societies were the people are shattered with liberal individualism - it has become almost impossible to solve social ills like homelessness. As you point out. People, and in particular not in the Americans, do not care for it´s fellow man.