SylveonFairy2019 is right. There is not enough information here to answer fully.
Shiny Xerneas has much more value than Rayquaza, and hence if you are looking to have rarer Pokémon over stronger Pokémon, choose Xerneas.
Assuming you are right that your Xerneas has not so good IVs and that Rayquaza has good Ivs, Rayquaza has more competitive value, so choose if it you are looking for stronger Pokémon over rarer Pokémon.
It all comes down to that you are using them for.
Also, your end part is not understandable, but Rayquaza cannot learn Dragon Ascent or Mega Evolve in X/Y, because the move nor mega evolutions is programmed to be in the game. However a Rayquaza obtained in X/Y, or transferred from X/Y, will be able to learn Dragon Ascent and mega evolve in the later games.