In Star Trek Picard we see Raffi living at rock bottom for a while. She has no job after her discharge from Starfleet, and is clearly not doing as well. She describes her life as humiliation and rage.
And yet by modern standards she has a home, food, and power. Her drug usage isn't condoned but she's left largely alone to do it. By modern 21st century standards its a very soft landing.
Does it get worse than this? What is the worst possible economic outcome someone living on 24th Century Earth is likely to face.
The events of DS9: Past Tense imply that things aren't as bad as sanctuary districts and mass homelessness, but there's a lot of range between that and where Raffi landed. So what evidence do we have about how bad it can get?
It seems to me that citizens have free access to the necessities of life - food, water, shelter, medical treatment, education, and the like, but they also have a wide degree of latitude in terms of how they choose to live their lives.
Raffi wasn't happy with her situation, but as you noted, she has her necessities. I think it's apparent that she's punishing herself, choosing to live in conditions she dislikes, because on some level, she believes she deserves it.
It also appears that people are free to refuse medical treatment, or mental health support in the case of Yvette Picard, which can create some gaps in the system, and the merits of which can be debated at length.
Not only does she have her necessities, her pissant trailer is bigger than any house I've ever lived in and is smack dab in the middle of a state park.
Earth is a functional paradise. It doesn't alleviate people from all suffering, especially emotional suffering, but there is nothing that Raffi could not have if she wanted it including a different house in a different part of the world. She is self-isolating, but she doesn't have to.
There is no "bad" economic outcomes on Earth anyway. I suspect that economic stratification comes in the form of human diaspora. Once you leave Earth to live on a colony or even just to live off-world, you might find that the world you move to doesn't have bustling cities yet and so there are no tickets to the opera.
But these are choices that we assume are more freely available.
We don't see any worse then Raffi on Earth or most of the 'modern' Federation. Raffi chose to live that way. I guess all the people that choose to live in "small" deluxe apartments might be "less" then Raffi's trailer.
A lot of space stations, like Jupiter Station, many space Starbases, and nearly all Starships don't have that much 'space'. So if you choose to live on one, you just get small luxury quarters. People like Mr.Mot the Barber or the servers in Ten Forward on the Enterprise-D chose to live there
A lot of the Colony worlds choose a Simple Life, where they do nearly everything the old fashioned way.....but even then they still have all the 24th comforts, they just choose not to do it. And I'm sure that growing some food is "fun", but that they still call out to the replcator for food. And sure you can 'make' charcoal...or you can just say 'a five pound bag of charcoal".