Almost any creature could escape before suffocating
In most circumstances, the victim would have ample time to chisel their way out.
Wall of Stone creates 10 foot panels (or larger). So let’s assume: (1) your spellcaster trapped their victim in the minimum size, 10' cube, and (2) they concentrated on the spell for 10 minutes, making the stone permanent.
I’m not aware of any rules that would cover suffocation in these conditions, so let’s fall-back on real-world facts. This Friday Fiction Facts: Trapped in an airtight room! article calculates it would take hours]for a person to suffocate in those conditions
“A moderately active or stressed person” would have about 17 hours until they experience symptoms such as “panting, dizziness, severe headache, vision disturbances” at which point we will assume they can not longer effectively chisel at the wall.
The wall is an object made of stone that can be damaged and thus
breached. Each panel has AC 15 and 30 hit points per inch of
thickness.
At 30 HP/inch times 6 inches, the victim needs to do 180 HP of damage to the AC 15 wall to escape.
Let’s assume our victim is a human commoner with no strength bonus. We’ll even take away their club listed in their stat block, and just give them an improvised weapons, with which they get no attack bonus. Each round, they can do 1d4 points of damage to the wall if they “hit” with a roll of 15 or higher.
With those assumptions, the commoner’s average damage-per-round would be 0.75 HP. On average (and with this many “rolls,” most attempts would be very close to average) it would take 240 rounds to chisel out.
A round is 6 seconds; there are 600 rounds in an hour, so our mild-mannered commoner can chisel free in 0.4 hours, or 24 minutes.
- (240 rounds) / (600 rounds per hour) = 0.4 hours = 24 minutes for a commoner to escape
So even if we make assumptions that our victim needs to rest three-quarters of the time they still get out with hours to spare.
If you are trapping an armed and dangerous creature, they are likely to be able to escape in even less time.
Edge cases
It’s easy to come up with edge cases where someone would not be able to dig out, or if the wall were made double thick, or more (which would require a lot of time since you have to concentrate for 10 minutes for each effect). In these cases the rules pretty much silent (the Portable Hole mentions death by suffocation in an enclosed space, but that’s a pretty different case).
Would there be tiny cracks in the wall, or the floor beneath it that allow air to seep in (like there are in the building where you sleep)? I think that is simply up to the DM. This is a world where you can breathe miles deep in the Underdark — the whole “how do we breathe” issue gets a little glossed over.
I likewise believe territories like this are 100% a DM call, so consider the following simply some creative suggestion.
As a DM trying to create a world my players enjoy, I would bend the rules in a functional blend of the two spells and effectively grant an ability that already exists in RAW. Earth Elemental has:
Earth Glide. The elemental can burrow through nonmagical, unworked earth and stone. While doing so, the elemental doesn't disturb the material it moves through.
To be more clear, I would rule the player can freely move in and out of stone while both effects are active, and may end his or her movement there. Considering a player must expend two spell slots, use two turns, and maintain concentration throughout, the effect is not unreasonable to me. Counterexamples are welcome, but I don't believe it exceeds what is possible with other spells or effects of a greater level or cost.
As for the finer interactions:
- It's reasonable to think Meld Into Stone ejects you to the nearest space simply because you can't move after you enter the stone. I would use Investiture's rule and eject the player into the nearest space from their current position in all applicable cases.
- If the stone space the player occupied was transmuted, damaged, or destroyed, Meld ends and its bludgeoning damage applies. The player was part of the stone, after all. I don't see a reason this should end Investiture, apart from the concentration check
- If concentration on Investiture ends, I see two possibilities- eject and be stunned, and both spells end; Or (hehe) the player is frozen in stone since they've lost the effect that was allowing them to move, but retain the effect that makes them part of the stone. They remain so until Meld ends. I might be nice and let them use movement to leave if they just happen to have frozen at the edge of the stone surface (i.e. in a space they could have occupied by casting only Meld).
- I would allow Meld to remain active as long as concentration is maintained on Investiture, even if the user leaves the stone area. This is absolutely homebrewery, but I feel it's justified based on the cost and risk of the combo.
Best Answer
In short: YES
This is a spell that is often overlooked as one of the most utilitarian there is. As long as the creation is simple (as in not elaborate), then yes. I have always thought of using that spell as something to do with Graham Crackers: box-shape and simple.