Does "what on earth" work same with "what-the-hell" ?
2 Answers
In short: yes and no.
The definitions for what the hell and what on earth both state that they are:
An exclamation used to emphasize surprise, shock, anger, disgust, etc.
However, what the hell uses the word hell as an intensifier, giving it much more emotional impact compared to what on earth.
what the hell can also mean:
Why not; one might as well; it makes no difference anyway.
An example:
A: Do you think we can add some extra effects to this scene?
B: Sure, what the hell. It's not like we're short on funds or anything.
So, in summation, when it comes to expressing shock, they are pretty much interchangeable, though what the hell should be used if you want to give your speech a bit more oomph. If life requires you to not give a damn about anything, then use what the hell, but not what on earth.