Modern engineering and machinery enables us to build some pretty impressive things. Emphasis on modern.
However, the city of Erebor, as shows in the LOTR movies is ... gargantuan. Vast ceiling supported by ridiculously tall columns, massive staircases over lava lakes, halls that would put large airport terminals to shame, etc. Even with our technology that would be an undertaking that would take decades (I almost want to say centuries).
When digging within a mountain (not necessarily under sea level, which brings problems of its own) you have to consider that any sort of earthquake, etc. would potentially cause massive collapses if you were to try and build these massive halls. You would need to reinforce them to a ridiculous degree.
I sincerely doubt that 5000 workers with medieval tech could pull off something even a third of the size within their life times.
Some sort of mountain fortress? Sure. Maybe even a pretty cool one.
But Erebor? No.
Also keep in mind that in most LOTR lore these dwarven cities are depicted as having been built over generations and generations. And dwarfs live for hundreds of years. If you were to combine a long timeline with some sort of dwarven magic you might be able to explain it.
3"a dwarven castle embedded in a giant pile of rock" - this isn't clear enough for us to tell you how feasible a mountain fortress is. There are lots of different types of mountain fortresses in fantasy, so we're going to need more detail than that. – Rob Watts – 2016-05-16T16:08:20.907
I agree with Robb – Xandar The Zenon – 2016-05-16T21:09:26.067
1
I recommend Slaves to Armok II
– dot_Sp0T – 2016-05-17T11:35:39.417We can and we have. I've spent two days in Petra. I've never seen Lord of the Rings, but Petra has, sure a lot of openings; but also goes pretty deep and was a functioning city. It is built into sandstone. When I google Erebor, that looks like much harder stone. Petra was a city, not a fortress. – Mikey – 2016-05-17T17:19:44.963