Going back to Meritocracy abit, and taking in the Ensign Kim apartment..
I've always thought the Star Trek future was a socialist utopia, nobody wants for anything etc. However, you do have some kind of reward, Some people being more equal than others.
Yes, there is a floor, if you are born and literally do nothing, you have an apartment, food, etc. But if you go out into the world and do, something, you get rewarded, a nicer apartment with a view maybe. So Ensign Kim, being in starfleet, and having a designer post rates him for an X amount of square feet apartment, maybe the nice view was available, so he asked for it. Basically, there has to be some kind of reward system to people doing work, or there would be Zero reason to do said work.
as said, Rafi fell to the bottom, but she still had a place, food etc. but it wasn't a chateau. Picard had the chateau because he was making wine, he may have gotten out of starfleet, but he was still being productive. how did he get the land? Maybe it was in the family since say the 19th century, and the earth government, or whatever bureau lets him keep the land as long as he or his family is being productive with it. I'm sure if somebody came along, saying he/she wanted to grow grapes for wine, that they'd go ask whatever bureau of land managment for a parcel of land. If available, they'll say yes or no, they may have to submit a proposal of what they want to do. But lets say they get 5 acres, they do well, and ask for more land. or they fail, and they get there land taken back and redistributed to someone who wants to try X or Y.