They used the credit system for trading with other worlds. So there must be some form of currency.
Does the federation really use a credit system for trading with other worlds? Every time we see a starship captain need something they can't replicate, they wind up having to trade for it. If the Federation used standardized trade credits, they could just make a wire transfer.
Even in Starfleet, Officers get their own quarters, while many enlisted members share bunks. There is still a reward system in place for people who do the smaller supply and high demand job. As well in the trek world.
Only a small percentage of Federation society belongs to Starfleet, or even works on a freighter.
there seems to be people who are doing some rather tough jobs, not because they really want to, but because they feel like they need to.
That's how it really works for most people with tough jobs who are not at the very bottom rung of society. They could work less or work a different job and still meet their needs.
Now they may not have a currency system, but perhaps a system where your work that you performs allows for a particular quality of life. So a low skill job, such as the equivalent of a fast food worker. Will allow you to have a small 25 square meter studio apartment, with 10 square meter rooms for each child. You would have transportation privileges to go to places you need to go with a modest amount needed to go to places you want to go.
Actually, they'd probably let you go absolutely anywhere. But you probably have to win a lottery or something to go to the most popular places that everyone wants to visit. We already have systems like this.
While if you are in charge of a galactic institution where you have a lot of responsibilities then you have the equivalent of a mansion, and access to nearly unlimited transportation, and other privileges.
Didn't Data have such a dwelling at Cambridge?... ah yes, Wikipedia informs me that my memory does not fail me on this occasion.