Since in Star Trek you can make pretty much whatever you want out of poop and hydrogen, cost isn't an issue.
Backstage, the writers do their damnedest to invent reasons why conventional wisdom would still hold and big things like starships would still be "expensive" to build. One of the TNG Tech Manual ideas on this is that while structures and systems in general are easily replicated or otherwise futuristically manufactured, warp coils are a bottleneck: they have to be "cast", just as painstakingly as gunbarrels for old battleships were cast in a serious real-world shipbuilding bottleneck.
Of course, the E-E has bigger nacelles than the E-D, so the newer starship might end up being the more "expensive" to build. That is, if the number of coils (nacelle length) is decisive, rather than the diameter of coils.