TSMC does something almost like this. They offer reduced cost prototyping with their "shuttle" service. A shuttle run groups several TSMC customers who all want to build a small run of engineering prototypes, and builds them all on one wafer. Sharing the fixed wafer start costs dramatically reduces cost per device for each customer, which makes prototyping a lot more practical. There are downsides of course. This isn't mass production, you won't be able to order a large number of devices even if you think you could use them for testing. I expect the contract terms are also much riskier (for customers, not TSMC) than production contracts.
Unlike your idea, though, TSMC's shuttle service never places prototype and production devices on the same wafer. In fact, TSMC has different QoS for shuttle and production wafers. A wafer's trip through a fab involves stops at potentially hundreds of different machines. Shuttle wafers get scheduling priority so they can move through the fab faster (reduces calendar latency from wafer start to packaged device, which is important for prototyping), while production wafer scheduling is optimized for throughput instead.