An enormous diverse prestigious metropolis sounds like it has a significant percentage of sophisticated educated people, and the royalty and upper class are probably fabulously wealthy and content. It's not easy to convert this status quo.
If there was a disaster and breakdown of alliances, turning 100% xenophobic seems improbable. It's absurd to think that ALL the non-humans and ALL the gods are to blame for some disaster. You might scapegoat one particular race and their pantheon, or you might appease them, or you might turn to another divine patron to support you, but it takes a strange twist of paranoia to turn your back to the entire damn universe.
Thats a good thought, but the way I have it, the gods, and the non-human races are 100% real like the humans.They discover science? Eg they discover that deities are just the creations of belief, without belief they don't exist, and the power of belief can be turned to self-belief, creating "men like gods".
Perhaps they also discover that all non-human races are created from the dreams and fears of humanity, so they are not really real, so it's ok to do whatever you want to them, they're just phantasms after all.
They discover science? Eg they discover that deities are just the creations of belief, without belief they don't exist, and the power of belief can be turned to self-belief, creating "men like gods" (granting Clerical magic to themselves, of course!)

(Dungeons & Dragons)
Rulebook featuring "high magic" options, including a host of new spells.