Hi Simone,
When applied to people (and animals) miserable usually means either "feeling very unhappy" or "living in a state of distress". Depending on the context, it can also imply that a person is bad tempered/unpleasant to deal with.
So "my dog looks miserable" and "homeless people are miserable" both convey those meanings well, and UNHAPPY is definitely the right synonym.
Because they refer to people as well, the other two sentences ("The world is full of miserable people" and "the staff are miserable") also convey UNHAPPY to me. "The staff are miserable" also suggests that they are unpleasant/bad tempered too, as the context was that you wouldn't recommend the pub. It's all context - if the sentence had been, e.g., "when they heard they'd lost their jobs, the staff were miserable", that would just suggest unhappiness.
Note: you can also use miserable to describe conditions or events, but the meanings are slightly different:
• "I had such a miserable week" (meaning: "full of unhappiness/discomfort", UNHAPPY would work as a synonym here too)
• "The weather is cold and miserable today" (meaning: "causing unhappiness/discomfort", more like UNPLEASANT)
You're right that miserable can also mean "pathetically inadequate or meagre", which is related to ideas of LOW VALUE / LOW QUALITY and also to the idea of "causing discomfort". As far as I'm aware this meaning is less common, and I don't think you'd use it to describe people. It's one of those words that only sounds correct in a few circumstances. Some sample sentences for that would be:
• "The company pays them a miserable salary" (pathetically low amount, synonym would be INADEQUATE)
• "They set a miserable example for her" (an incredibly poor example, VERY POOR [/LOW QUALITY] would work as a synonym here, maybe even DEPLORABLE)
Hope that helps. :)