I was messing up with PKHeX Event flags in XY, and managed to rebattle Xerneas/Yveltal. Unfortunately this isn't a simple flag.
First, the flags that enable Xerneas/Yveltal in HQ basement are the following:
Flag Status 0837 - UnSet
Flag Status 0838 - Set
The big problem now is that there's no way enter the Team Flare's HQ in Geosense Town after the events are finished. So, we must change other stuffs:
Constant 159 must have value 7 to enable entering the elevator in the big rock (after events, the value is changed to 9)
This will let you enter the hidden door anyways and reach the HQ basement, where Xerneas/Yveltal is awaiting.
(If you change also constant 49 to value 4640, the Geosense Town scenary will behave the same as the event, but this is not necessary).
Second problem is that after you capture Xerneas/Yveltal you will need to rebattle Lysandre. I couldn't find a way to prevent this yet.
All I know is that if you lose the battle with Lysandre, the constant 202 will have value 6, so when you reenter the basement, Lysandre will be awaiting to battle.
After winning battle, the constant 202 will have value 7, and constant 159 will have value 9.
If anyone that understands more about the event flags can do more research about this, maybe there's a way to disable Lysandre battle right after capturing the Legend.