What sets "top" universities apart from "mediocre" universities in continental europe?
To be honest, I don't much like the idea that some people suggest there are "mediocre" universities. Good research can be done just about anywhere in many fields. Caveat: Some fields require funding beyond what is available at other than the biggest, richest, universities. 

But there are several things that go into the rankings. I suspect that most of them are cumulative in some way. A lot of great research gets done at Oxbridge because of its size and history and attractiveness to scholars (and funders). Other schools don't have the same features. But the ranking is due as much to the quantity of good research as to the quality, as the quality can be good anywhere, but the resources available don't support as much of it. 

A larger university has an advantage since it can more easily support working groups that can collectively produce great research. A smaller place leaves its faculty more isolated (less true today than historically - but history is part of this) with less opportunity for sharing and synergy. 

Some of it is just luck over time. Good faculty attract good faculty. Researchers attract researchers. An older university, if well managed, has an advantage over a newer one. It takes time to build reputation. The magnetic attraction of a good place increases over time. Harvard University, like most others, had a modest beginning. Its founders would be unlikely to recognize what it has become. Certainly its mission is quite different than it was originally. 

A good reputation attracts students. Often it attracts far too many students. This lets such a place choose really good students who wind up having really good careers, adding to that reputation. And for some of those graduates it means wealth and for some of those, contributions back to their university. Harvard graduates tend to be pretty smart. But they were already judged to be pretty smart before they went to Harvard. Ubiquitous? Maybe. 

Resources matter a lot. Especially today, with a more mobile pool of researchers than was possible in the past. For example, Europe is largely without borders and the links between Europe and the Americas are strong. So people can go where there are other compatible people (and good funding). So reputation tends to build on reputation. 

But not every brilliant researcher or teacher wants to put up with the constant pressure of a "top" university, so it is possible to find that brilliance spread out. Just because you happen to be at an R2 or a teaching college doesn't make you mediocre. It can make you sane, actually. Hence my objection to the "mediocre" characterization.