What happens to en route flights when a major earthquake etc. destroys facilities?
This is a valid and good question. The answer is all the different entities will work together to solve the issue.

It's called a system wide event, be it a natural disaster or otherwise.


  [It's an] event that affects a flight and a sufficiently wide area that all alternate routes and airfields briefed during pre-flight preparation have become unavailable. Ground facilities such as navigation beacons and air traffic services may also be affected.


A somewhat recent example is the closure of many airports in Japan after the 2011 Tōhoku earthquake and tsunami.

As you can imagine, this only affects a tiny portion of flights that are too near the center of the event. The ATC, flight-crew, and company (airline) personnel will all work together. Even a simple thing such as using the internet access aboard planes to gauge the situation on ground from the different news feeds can be used.

Best case scenario is there would be enough fuel to turn around and exit the radius/area of the event toward the most suitable location. There usually will be enough fuel, and using the performance manuals the flight crew can make their plane very efficient. Airlines balance fuel and time using what's called a Cost Index, in this case, they will push to save on fuel and forget time (flying slower but farther).

In conclusion, the affected are few, the events are far between, each flight will be very unique, and this is where human ingenuity, training, and decision making skills come in.

For the facilities part, there are a few posts on that here, for example see: Is there an ATC radio backup? Even if the radio is down, handheld radios can be used. Most of the aviation systems have many built-in redundancies.