Well, I have some thoughts..
The simplest explanation is not always the most fun. Yes, you could say a school of mutants has always existed in West Chester, NY, but chose not to engage in any of the world threatening struggles– boring, (and also, very unlike the X-Men to ignore such threats). And the Baxter Building has been in the Microverse the whole time? –not buying it.
You could solve it easily with time travel, via the Infinity Gauntlet, with Captain Marvel resetting the entire universe, but one of things is not like the others– enter the XMen in an end credit trailer to the deafening screams of Marvel fans (I would be one of them), as Stan Lee begins reading a copy of the Daily Bugle with Fantastic Four on the front page. This is certainly scifi plausible and would be acceptable, but I have another theory..
..during the final battle with Thanos, Scarlet Witch alters reality with her magic, destroying the Infinity Stones, ceasing Thanos to have ever existed, but also inadvertently alters the reality of the universe. The previously vaporized superheroes return and BOOM the XMen now exist, and have always existed according to everyone, except Wanda. Wolverine, Rogue and SpiderWoman (Jessica Drew) are standing beside their teammates, the Avengers, The Fantastic Four can be seen far away atop the Baxter Building, and far, far away, the Silver Surfer makes a deal with Galactus to save Zenn-la.
..to me, my XMen..