Why DRAM costs much more than flash memory?
The key element in the difference is redundancy. A DRAM has to be perfect (that is, it has no redundancy). This is because, in order to get the speeds required of DRAM, there is no buffer level between the address inputs and the memory cells except for address decoding.

Flash, on the other hand, is not expected to run nearly as fast as DRAM, and this allows the insertion of various logic into the address logic. Specifically, data is organized into blocks (equivalent to pages), and there are a fair number of spare blocks included on the chip. When an access is attempted the address essentially goes into a lookup table which redirects access from a known bad block to a good (spare) one.

The result is that manufacturing can be much cheaper for flash than DRAM, since it is much harder to produce a bad (unusable) chip for flash.