The sleepers are all individual rooms of some description with 1-2 beds. There are some larger up to 4 adults. There are no hostel style bunk cars on trains. You're either sleeping in seats or in a room.
Canada's Via Rail trains have hostel-style bunk beds, called berths, double-stacked on both sides of the corridor, with a heavy curtain covering them. During the day they are converted into open compartments with couch-style seating.
Common showers, but this wasn't a problem at all for us.
The NY<->Chicago line had toilets in the compartment - but I mean in the compartment, not a separate bathroom. So not so great.
The California Zephyr (Chicago<->SF) has common toilets. The one in our sleeper car was broken for the whole trip, for which Amtrak only gave us the slightest nod of recognition.
https://www.amtrakvacations.com/blog/3-important-things-to-k... (just googling 'amtrak sleeper' gets you this info!)