I'd bet that the vast majority of that cost isn't going to be materials -- it'll be staff time to design and optimise the telescope and make something that can work, including where necessary how to make new materials or processes to make that telescope. I'm not saying the actual hardware is cheap by any stretch of the imagination, but making three different telescopes isn't a linear function of that budget. They're literally pushing the envelope of what's possible here. If something terrible happens to the rocket, lots of forms will be written and people will be sad but fundamentally I think they'll build something a bit better on a few years and nail it. A bit like New Horizons (awesome Mars rover) vs Beagle 2 (awesome Mars rover that died on arrival to Mars).
The material cost for a lot of "high technology" things can be very small, but the process is expensive. For example fancy chips are only some x grams of silicon, and expensive inverted mesa quartz crystals might cost a good bit while only being x microns thick piece of quartz..