There does not have to be "poor" or "rich". There just has to be free access to land and resources. Land which currently government owns can be distributed to everyone. The cost of living does not have to be high either. Labor does not have to be done by human beings. While some human labor might be more valuable than other kinds at certain times it doesn't mean we have a way to measure the value of a human life.
In addition there is no reason to believe people need charity. Do non-human animals require charity? No. They require habitat with access to all the resources necessary to provide for themselves. Humans would only need access to cheap renewable resources like electricity, the Internet, knowledge sources, water, air, and land. The problem is other humans or government claims ownership of the resources necessary for a human to depend on themselves which forces humans to depend on the rich, or the government, or big corporations.
The cost of maintaining society goes down as the cost of automation goes down. So you don't need as many smart people as automation becomes smarter than the smarter people due to AI. So even being smart is no long term security nor is being skilled. There is really no long term way for a human being to guarantee their utility to the economy once AI becomes smart.
The only thing humans can do at that point is be human and be valued for being human.