Not as much protection as you'd think.
Try this at home - get a shovel, and try to pile "loose earth" into the shape you've described (3ft tall, 2ft deep wall). It will immediately fall down into a pile. The angle of repose of soil is 30-45 degrees. In your configuration (2ft diameter base) the pile needs to have an angle of repose of 75 degrees. So the entire thing flops over to about half its height. The soil from the sides of the hole is also falling inwards, filling up your hole, probably reducing the amount of cover from the hole by half as well. If you're unlucky, the soil from the wall will fall backwards into your hole and reduce the depth even further. It would look more like this:
| OO
| OOOOOOO
XXXXXXXXXXXO XXXXXXXXXX
XXXXXXXXXXXOOO XXXXXXXXXXXXX
XXXXXXXXXXXXOXXXXXXXXXXXXXXX
If you're lucky, you'll get 3 feet of cover (partial cover) out of this. There's a reason soldiers build trenches out of packed, not loose, soil.
I only have a basic understanding of the principles of stone sculpting
and any insights are appreciated.
Use your imagination. What do you want it to look like?
D&D 5e is not reality simulation, nor does it attempt to be. Difficult terrain is ground that is hard to walk on, an area where you are slowed down by trying to move through it. This could be a pile of boulders, a swamp, mud, or just very uneven ground where no two steps are on the same level.
Assuming the caster is skilled enough to smooth the stone within the hour, such that it is no longer difficult terrain, what happens when the spell ends?
The magical effect ends. Whatever was there becomes what it was before the cantrip was cast. The duration of the magical effect is one hour.
How exactly was the stone warped in the first place?
By magic.
How does normal terrain become less difficult terrain?
By magic.
Would the effect be ascetically pleasing or would it look sloppy?
That depends upon the interaction between the player and the DM.
Use your imagination. What do you want it to look like? This is where a DM's ruling is appropriate. Tell the DM what you want it to look like. The flow of events in D&D (p. 3, Basic Rules) is:
How to Play
1. The DM describes the environment.
2. The players describe what they want to do.
3. The DM narrates the results of the adventurers’ actions.
You describe what you want it to look like. The DM rules on that with your input considered.
The philosophy that the game started with still applies. D&D 5e has tried to unify the D&D fan base, in some cases reaching back to first principles ... When Imagination Was The Only Rule ... the theme behind Rob Kuntz'1 projects.
Action required: use your imagination and describe what efforts you are putting into this bit of magic-assisted sculpture, and what you are trying to make it look like. Give the DM something to work with so that he doesn't have to do a lot of work to arrive at a ruling. (As a DM of some experience, I promise you, such efforts are appreciated).
1 Who is Rob Kuntz and what does he have to do with D&D 5e? The front page of the rule book says that the game is:
Based on the original D&D game created by E. Gary Gygax and Dave Arneson, with Brian Blume, Rob Kuntz, James Ward, and Don Kaye
Best Answer
Possibly, if the enemy can't get out of the hole
As an action for mold earth, you can excavate a 5ft cube and put the earth up to 5ft away. Moving it away for long enough for someone to fall in (slowly so they don't take damage) would be your action as you can only move the earth once.
If the creature doesn't bother leaving the hole then maybe you could fill it back up, but there are a few issues:
First the spell doesn't actually let you just move earth, just excavate it. I can't imagine many a DM having an issue with you doing so, but it doesn't appear to be RAW.
Secondly there are no rules for what happens afterwards, so the DM would have to rule. Is the earth loose enough that it doesn't really matter? Do physics come I to play and crush the burried creature? I would rule that this has the same effect as the 3rd part of the spell and just makes it difficult terrain for escape. I might give advantage to hit in melee for someone who has the high ground but that would be situational, and I do it often enough anyway.