Mega Rayquaza is unique in that it is nearly impossible to counter, and as such only the best checks are presented.
Bulky Fairy-types: Bulky Fairy-types, such as Arceus-Fairy and Xerneas, can take even any boosted hit most of the time and OHKO Mega Rayquaza with their STAB moves. However, both get 2HKOed by Life Orb boosted Dragon Ascent, limiting their ability to switch in.
Rock-types: Shuca Berry Tyranitar and Arceus-Rock can switch in on both Dragon Ascent and V-create. Unfortunately, Tyranitar gets 2HKOed by Draco Meteor, while Arceus-Rock will either get OHKOed by +1 Life Orb boosted Earthquake or 2HKOed by Draco Meteor if it is more physically defensive.
Bulky Walls: Defensive Zygarde-C, Lugia, and Giratina are able to avoid the OHKO from Life Orb Mega Rayquaza's +1 Dragon Ascent as well as the 2HKO from its unboosted Dragon Ascent. In return, they can retaliate with either Dragon Tail or Ice Beam. Unfortunately, Lugia loses to Choice Band Mega Rayquaza, Zygarde-C gets OHKOed by Draco Meteor, and Giratina falls to both.
Steel-types: Skarmory and Celesteela can easily wall out the Dragon Dance variant without Earthquake, but V-create OHKOes both. Arceus-Steel and Necrozma-DM can switch in on Dragon Ascent, but both fall prey to V-create as well.
Revenge Killers: Mega Gengar and Marshadow are immune to Extreme Speed and can pick off a weakened Mega Rayquaza. Marshadow also carries Shadow Sneak, allowing it to revenge kill Mega Rayquaza even after a Dragon Dance. Other faster threats include Ultra Necrozma and Choice Scarf Xerneas, but they take heavy damage from Extreme Speed.
Bulky Arceus Formes: Many bulky Arceus formes can avoid a 2HKO from Choice Scarf Mega Rayquaza's Dragon Ascent and an OHKO from +1 Life Orb boosted Dragon Ascent, rendering them viable checks in specific scenarios. However, the inability to OHKO Mega Rayquaza from full makes Arceus-Ground, Arceus-Water, and Arceus-Dark much less viable than Arceus-Fairy as a check.
Stealth Rock: One of the best ways to hinder Mega Rayquaza is to set up Stealth Rock, as Rayquaza will take 25% of damage from the entry hazard every single time it switches in, making it easier to revenge kill.
Status: Mega Rayquaza hates status in general, with some sets such as Choice Scarf especially disliking paralysis and others like Dragon Dance and Choice Band being completely neutered by burns. Hence, inflicting Mega Rayquaza with status is a good way to limit its versatility and wear it down.