For context, my party is going to face a Gargantuan (20 by 20 ft. or larger) creature with obscene levels of health.
The polymorph spell description says, in part:
This spell transforms a creature that you can see within range into a new form. An unwilling creature must make a Wisdom saving throw to avoid the effect. The spell has no effect on a shapechanger or a creature with 0 hit points.
The transformation lasts for the duration, or until the target drops to 0 hit points or dies. The new form can be any beast whose challenge rating is equal to or less than the target’s (or the target’s level, if it doesn’t have a challenge rating). [...]
Would it be possible to cast the demiplane spell, polymorph the Gargantuan creature down to size, and then shove it into the demiplane, trapping it there?
After trapping it there, would it be possible to release it in, let's say, Hell or just a 'void'?
This assumes that the creature has already used up everything it can to resist magic. The creature is being shoved into the demiplane.