A government shouldn't build hospitals for the poor, or schools for the poor in the same sense it shouldn't have buses with separate benches for black people ("affirmative action" programs face the same problem). It a big problem of democracy as a form of government that it encourages "for show", high-visibility/low-impact, governing, and assistentialism and affirmative action fit the bill perfectly. Most rulers are not trying to help the poor, but to show that they are helping the poor.
Back where I com from, a few decades ago, there was a system of informal government called "coronelism". Affluent farmers or city politicians, called "coronéis", would build informal support networks around themselves (paying for a bright poor kid's education here, paying for a poor woman's surgery there, etc), and make it so that for most poor people they were the only way into having access to basic services of civilization. It was a crooked incentives game, and they elected themselves like this while laundering taxpayer money and sabotaging any sort of project that would provide real education, health care, etc, to the poor people, as a form of keeping control. The rest of the country needed to move forward a lot before this could be suplanted.
I feel most affirmative action programs work in the same way. You can't criticise hospitals or housing for poor people in the same way you can't criticise the "coronel" for putting that bright poor kid through college and making a lawyer/doctor/engineer out of him, but neither of these actions actually change anything in the scale of society in the long term.
The problem is that in most countries the poor are people who can't buy anything, whereas in the US the poor are people who can't be sold anything. They're like the spent fuel rods of capitalism. You can try to recycle them, or try to bury them, but moving them from place to place only causes trouble.
So I have concluded that if you REALLY want to "help the poor", you have to start by removing "poor" from your program definition and qualifying requirements. Instead, ask yourself: what would help the people generally and do so in such a way that, coincidentally, poor people would benefit significantly? For example, countries that help parents generally, regardless of marital status or income, seem to get better results than the American Welfare system.