While density might play a part it's not a silver bullet. As with everything, the solution is probably custom to each city and region
Could they move to a cheaper city? Probably, but that has big life implications, people might take the economical hit to be able to stay close to home.
What I mean to say is that in this particular case it's not just a density problem. There's problems with tourism, there's problems with speculation, there's problems with general inequality. So the solution is not just build more, it's way more nuanced.
And on a non-financial view, how is the situation w.r.t. public transport and car usage?
I fully agree that density is not a silver bullet. My point is that artificially reducing density when there is a high demand for living places is bad. Both because of supply and demand, and also because of positive externalities from (voluntary) high density living.
It does seem to sometimes be the case that high density cities increase demand so much that prices remain the same, or increase. That sucks from the perspective of economic equality. However, from a perspective of creating value, this is amazing. It means that these dense cities give the same value (enjoyment of living there) to more people. Especially if (as you say lower in the thread) people aren't moving to the city for jobs, but for the city itself. That essentially shows that the city is just really nice to live in.
Sadly, it suggests that density sometimes does not help economic equality. But it is still a massive improvement to have people want to live in the city so much!