Evolution depends on many things, the easiest to control in your story is mating pressures,
What we know about Dwarfs... 100% certain
- They're shorter than average.
What Fantasy stories tell us about dwarfs
- They are short
- They are usually quite stocky
- They like living underground
- They always have beards (even the women sometimes)
- They like mining for Gold, Silver, Mythril etc
Some sections of LOTR have Gimli give us more info that might be useful, ()some people believe there are no dwarf women (due to the beards) and that dwarfs are natural sprinters.
Now if that first section is to be believed, it may be because dwarf women look similar to dwarf men, or possibly, dwarf women are not as common as Dwarf men, This is the key!
Shortness is both genetic and environmental, generally speaking well fed children that have balanced diets will be taller than their parents. but what if they had the exact same diet as their parents had during youth? then in theory there would be no environmental change, so it forces it down to genetics.
If Gimli from LOTR is to be believed, Dwarfs are natural sprinters, not marathon runners. so why would this be, possibly because once they'd mined some Gold, or Mythril, or Handwavium... then they'd run back to the forge and smelt it and stamp it with their name. so speed was key. but what about short passageways, running down them would lead to banged heads... a lot of them. this could mean that they were slower and therefore either have their gold ore taken by another dwarf (or person of any race) or their accumulation of wealth would be slower as they'd be unconscious all the time.
Now if dwarf women preferred richer men do to that being the culture of dwarfs, then they would tend to favour shorter more conscious men, or at least the faster ones, which often were the shorter ones. and being that each woman would have her pick of many men, it could slowly remove the taller genes from the gene pool.
This same line of reasoning could be used for the other options, more time mining means more wealth so why live above ground and take an hour to walk down when you could just live down there, less distance to the gold, more time ming, more money. i think the key deciding factor with dwarfs is that if dwarf women are not as common, make this the case and everything can be explained by runaway Darwinian traits. think shortness and beards being the peacocks tail.
I appreciate this doesn't look fondly upon dwarf women, making them look like gold diggers, proverbially speaking of course. But it would be down to cultural differences, and is not intended to offend normal human women, especially those that read this.
Edit: as for their stockiness, when compared to Elder Scroll's Falmer, those creatures have very little in the way of fat for insulation against the cold of living underground, yes working would generate heat, but while sleeping underground like that they would burn through calories fast keeping themselves warm, which means more food (a limited resource underground) so being fat and short reduces surface area from which to lose heat while adding the insulation needed to retain it.
And as far as food goes, underground surface connected aquifers could provide a plentiful supply of fish, as well as cave fungus and lichen etc. while i've only ever been caving once, it surprised me just how much life is down there. in theory there's no reason why a dwarf cave would be any different