Some things need to be addressed here. Can the structures be made? When does a mine get too hot? What about asphyxiation? What about food? It should be noted that many of the issues here can be solved or compounded by local factors, so this answer applies in general cases, not specifics. Where the dwarves decide to mine, what rock they are mining, and other factors can make a place viable or not.
The Structures
Obviously, these dwarves are masters of rock-cut architecture. There are examples, mostly in India, of cities, towns, and temples which were carved from stone. It is very possible, as we humans did it! However, I doubt much of these go as deep as someone may think the Mines of Moria go.
In any case, the structures themselves can happen with Middle Age tools and techniques. The limiting factors are likely how hot it got and asphyxiation in your dwarf-town. In fact, it may be easier to make Gothic Architecture inside of mountains because you start at the ceiling and dig down!
Underground Temperatures
The TauTona and Mponeng Mines are really deep; about 3.5 km and 4 km below the surface, respectively. They report temperatures of 55-60 degrees C and 66 degrees C. Way too hot for most human-like biologies to function. Many sources claim that the geothermal gradient is about 25 degrees C per km, so unless your dwarves have some awesome ability to cool themselves, you would not be going that deep. Humans can live at about 21 C quite comfortably, but ~38 C can cause problems. At that temperature, you run a huge risk of heat exhaustion and heat stroke, as the rock and air around you is as warm as you are.
To put this in perspective, 1 km may actually be deeper than you realize, as it isn't a long distance to walk, but it is a long distance to dig or fall. (The Grand Canyon can get up to 1.8 km deep!) Then again, if the surface is freezing, then getting 25 C warmer would be really nice.
Air
This is a tricky one. Living on a mountain, you could use winds to make bellows and pipes to move air as needed down pipes or tunnels. Bellows are so old we are not sure who made them. There are even words for them in Old Norse! They were around in the Middle Ages of Europe. This is very energy-intensive, though, so it is not the best solution.
What about the open spaces and halls you seen in the movies?
This may actually help, because the large body of air (with internal convection) can give a dwarf population enough air to last them longer than if it was a narrow hall. You would just need some well-placed windows up high or on opposite sides of your mountain to allow fresh air in. Additionally, we know of many caves that are really big!
If these dwarves were especially good with fluid dynamics, they could create an air tunnel system which takes prevailing winds and temperature gradients to funnel fresh air through their tunnels. This is tricky, and can be difficult to do.
You also need to worry about damps. Those are pockets of dangerous air. The technology used to manage them range from very complicated to hanging sheets to guide air. Obviously, dwarves can hang sheets; they just need to guide the air to a place where it can safely diffuse. Once again, the giant halls and open spaces would be helpful.
Food
Cave Ecosystems are difficult. Here is a list of troglobites; creatures who exclusively live in caves. There is not much there that is very nutritious, nor is it especially abundant. The US National Park Service claims that caves mostly rely on resources coming in from the outside. That is prime real estate for decomposers, like mushrooms and insects!
You can have an ecosystem which does not rely on sunlight at all, as the oceanic thermal vents have shown us. Similarly, you can have chemoautotrophic bacteria which could, in theory, form the foundation of a dwarf-sustaining ecosystem. The downside, however, is that cave-life seems to not get especially large. If you look at the list of troglobites, you will see a lack of mammals.
There are people who want to grow plants underground, such as the people of growing underground. However, you would need a source a light, and LEDs / full spectrum lighting is likely beyond our dwarves. You could try a series of mirrors, but mirrors of that size and quality would likely be too hard for dwarves to make. (They may have been able to use tin or other metals, but its unlikely.)
Given these lists of troglobites, and whatever finds its way into caves, it would be safe to assume that dwarves have no scruples about eating fungi, fish, or insects. Those living strictly underground would rely on eating those.