Why are people even arguing about space travel vs solving poverty? Just imagine if all of Musk's wealth is seized by the US government, would that solve poverty or homelessness or even make a difference?
Obviously not, Musk's billions are barely a drop in a bucket. The US government printed and spent Trillions during the pandemic, and that barely made some people's life better.
Most of the problems that we're having on Earth, including poverty, homelessness and climate change, are in fact socio-political problems and they can't be solved with any realistic amount of money. The only way to solve them is through either strong socio-political coordination or very advanced technology (AI, nuclear fusion etc.)