I’ve taken free coursera programming courses, and now I’m taking university CS courses. On one hand, the material we are expected to learn is definitely more rigorous. But the actual teaching quality is not better. The difference in costs reflects the value of the degree and the institution verifying your performance through tests, etc. But it’s hard to measure because better universities also get to select the better students who are likely to put a lot of work in to learn the material regardless of the quality of the teaching. So you still end up with better educated students I think, than the students who are accessing free teaching (I mean this on averages—so if a thousand students access a free class, a lower % of them will stick with it and learn the material).
There are definitely some motivated students who can take free teaching and run with it, but I think there are a lot of factors at play that keep paid education competitive anyway.