Yes the characters may hide successfully according to your scenario.
The order of events is important:
- Players are in a room by themselves (unseen by the enemy).
- Druid player casts the spell Pass Without Trace.
- Players each perform a +10 Dexterity (Stealth) check to determine if their characters are hidden in the veil of shadows.
- Gang of Hobgoblins kick open the door;
A) to a mysteriously empty room.
B) to see a lone Dwarf [who failed his Dexterity (Stealth) check].
Pass Without Trace:
A veil of shadows and silence radiates from you, masking you and your
companions from detection. For the duration, each creature you choose
within 30 feet of you (including you) has a +10 bonus to Dexterity
(Stealth) checks and can't be tracked except by magical means. A
creature that receives this bonus leaves behind no tracks or other
traces of its passage.
Since the characters were unseen before the Dexterity (Stealth) check, Rule One of hiding is irrelevant.
- If someone can see you, you can't attempt to hide from them.
Had the Hobgoblins already been in the room and seen the players, then this rule would apply, however they were not and so it doesn't.
In this scenario, Rule four of hiding applies:
- You can hide in plain sight, given a moment of being unseen or
unattended and an appropriate concealment strategy
In this case, the appropriate concealment strategy was casting the spell Pass Without Trace creating a magical veil of shadows that the PC's may attempt to hide within to become concealed.
The Druid character, according to the spell text chooses who will benefit from the spells effect. Each of the chosen must be within 30 feet of the Druid as the spell radiates from him/her. Each of the affected make their +10 Dexterity (Stealth) check to Hide into a magical veil of shadows.
The DM is as usual in control of the ability check DC.
They could determine that since the room has little else in the way of cover that the characters should still have a significant chance of failure to Hide.
Any characters outside of the spells range OR who did not pass their check would be visible to anyone entering the room.
If the characters pass the check, in terms of roleplay there are a number of ways to handle the encounter.
If not all the characters pass, when the Hobgoblins kick in the door, they would see one or more of the dwarves standing there in a shadowy room.
If all the characters pass, maybe the Hobgoblins after kicking in the door find it weird that the room is normally brightly lit and is now a dark haze with mysterious looming shadows. They can't see anyone but maybe they are suspicious and begin to investigate. They could walk in and bump into one of the characters or they could decide to close the door and lock it for fear of the hazy mist, barricading the door and presenting the players with a new challenge.