What would happen if somebody tried to dispel Mage’s Magnificent Mansion while it was occupied with people? What would happen to the people inside? Would they be transported to the place in the material plane where the Mage’s Magnificent Mansion was set before, be lost on a random plane, or something else?
The rules are silent on this issue, but it's reasonable for a DM to rule that
Creatures in a mansion when it's dispelled appear on the Material Plane at the mansion's entrance
and they're probably angry, confused, or both.
Were it nearly anything but this, clever PCs would cast the spell; designate naked, unconscious enemies as able to enter the mansion; huck their enemies inside; then dismiss the spell. Thus the mansion becomes a near-perfect, almost inescapable prison for a large percentage of the campaign's foes.1 It's hard to exit a demiplane when one lacks the capacity to cross dimensions, and that degree of confinement confirms that, for instance, foes won't simply return from the dead to bother the PCs later.
Seriously, just saying the PCs pop out when the mansion's dispelled makes things way easier.
The rules may not be perfectly clear on this matter, but they are far from silent.
The published rules offer ample and consistent support for a ruling that Mage's Magnificent Mansion can only be subject to Dispel Magic from within the Mansion itself.
There is the matter of line of effect:
You must have a clear line of effect to any target that you cast a spell on or to any space in which you wish to create an effect.
Since the mansion is explicitly described as being in extradimensional space, the mansion does not exist on the Prime Material Plane. By that virtue, there is no clear line of effect between a caster of Dispel Magic outside of the Mansion and the Mansion itself.
The description of the spell's portal is also unambiguous:
Since the place can be entered only through its special portal, outside conditions do not affect the mansion, nor do conditions inside it pass to the plane beyond.
While it doesn't explicitly spell out that the special portal blocks line of effect, this conclusion is consistent with the nature and level of the spell, and it is also consistent with the 3.5 ruleset, as published.
As to the matter of casting Dispel Magic in regards to interdimensional magic... the spell description for Dispel Magic is also far from silent.
An interdimensional interface (such as a bag of holding) is temporarily closed.
The Magnificent Mansion portal seems like ‘an interdimensional interface’.