It is historical fact that you can take a ridiculous and crumbling imperium with serfs and horse-drawn carts managed by a tyrannical and squabbling aristocracy and boot strap it into being a technologically sophisticated global power that can win the space race and such in a single generation even while being invaded by an evil and genocidal empire. The people at the top don't even need to be nice or sane, they just have to understand that economics is an entirely voodoo science, and the limits of production can be broken by thousands of percentage points by getting everyone to buy on credit, work on projects that people looking at the big picture tell them to work on, continuously invest in productive capital, and believe in the future.
Right. That's called Communism, and it ends the dark ages immediately even if it isn't run well. Presumably if it was being run by Paladins who actually radiate goodness and Wizards who are inhumanly intelligent and can cast powerful divinations to determine projected needs and goods could be distributed to the masses with teleportals - it would work substantially better. That sort of thing is not outside the capabilities of your characters in D&D. It's not outside the capabilities of the people in the village your characters are saving from gnollish invasion. It's not even technically complicated. But it isn't done.
Partly it isn't done because we're playing Dungeons & Dragons, not Logistics & Dragons. While it is true that you can fix the world's ills in a much more tangible fashion by industrializing the production of grain and arranging a non-gold based distribution system such that staple food stuffs are available to all, thereby freeing up potential productive labor for use in blah blah blah. . . the fact is that to a very real degree we play this game because telling stories about slaying evil necromancers and swinging on chandeliers is awesome. But the other reason is that the society in D&D really isn't ready for a modern or futuristic social setup. No one is going to understand how they are supposed to interact with Socialism, Capitalism, or Fascism, things are Feudal and people understand that. Wealth is exchanged for goods and services on the grounds that people on both sides of the exchange aren't sure that they would win the resulting combat if they tried to take the goods or wealth by force of arms.
Rome had steam engines. Actual difference engines that propelled a metal device with the power of a combustion reaction through the medium of the expansion of heated water. Really. They never built rail roads because slaves were cheaper than donkeys and the concept of investing in labor saving devices was preposterous. In D&D, the idea of having an economy based around trust in the government and labor/wealth equivalencies is similarly preposterous. It's not that the idea wouldn't work, it's that every man, woman, and child in society would simply laugh you out of the room if you tried to explain it to them.