I'm pretty sure that, like most things in 5e, this is intentionally not specified and left to the GM's judgment. That said, I think the answer for a particular game should depend on what it is that limits magic in your setting, which in turn is... let's say loosely correlated with overall game style.
1. Yes, you can create a damaging environment as easily as a safe one.
If magic is engineering, and follows orderly laws (even if they override the laws of physics as we know them, like how quantum physics is "more true" than classical Newtonian physics), then spells are about creating and manipulating matter and energy. In this model, "more powerful" spells literally use or manipulate more energy, and thus mages are limited by how much energy they can control.
So if you're already creating a new plane and filling it with such complex objects as hedges and/or buildings, it shouldn't be any harder, energy-wise, to say everything in this plane is pointy, or poisonous to touch, or whatever, including the ground. You're explicitly given control over the form this "confined structure or area" takes. It's all a matter of designing the model (material component) and manipulating matter just so.
This could be described as a Simulationist approach, trying to figure out what "makes sense" from a scientific perspective. (It's also risky; the fact that we aren't wizards who know the precise laws at play leaves any decision vulnerable to counterarguments that can't really be falsified.)
2. No, you can't set up a damaging environment because that's not what the spell is for.
If, instead, magic is more about supernaturally imposing your will on the universe, then outcome is more important. More powerful spells will be those that alter the ontological status of the universe and/or the course of events to a greater degree, and mages are limited by the effects they can achieve. (This is the model of classical fairy tales: curses always have a way out because you can't unilaterally change someone else's destiny; the elves can work wonders to amuse themselves but can't help you when it counts; etc.)
If this is the case, the answer is a clear no. The other prison types make it clear that this is a spell for imprisoning people, taking them out of a battle and possibly out of the story (by making them hard to find), but not killing them (which imprisoning them in a deadly environment would); that wouldn't be "fair".
This model will likely appeal more to Gamist and Narrativist types, both of whom care about how much one character can do to another with a single move. It's also, for my money, the most likely intended reading, for two reasons: they don't breathe, eat, drink, sleep, or age, suggesting effective suspended animation is the goal (with perhaps the added torture of being awake); and if you could, it would be too powerful even for a 9th level spell.
P.S. You could also split the difference, by requiring significant research into a variant of the spell, requiring that you include an achievable end condition, requiring two spell slots, etc. This sort of "yes, and..." is generally considered to be good improv and more fun than just saying "no", because it satisfies players who think it ought to be possible somehow, but doesn't let them screw up the story/world unless they really commit to it, which in turn lets them signal that they really want this to happen if that's the case.