Sci-fi JRPG dungeon

I remember being in one of two parties in this underground medical facility judging from its appearance. It was like I was in an RPG or something, so think parties of adventurers.

We were racing a rival party to somewhere until we encountered each other in this vast cavern. There's a cliff on one side and the space stretches far into the distance, though it's all still underground. There are what appear to be corpses everywhere, though they aren't zombies and don't appear to be entirely human (i.e., synthetic construction).

After pondering this unexpected development with the rival party, the bodies start rising one by one and clamouring around us (it sorta reminded me of the desert village in Nier:Automata). After a while they all changed behaviour and ran off the cliff, merged together at the bottom, before rising back up as this large floating boss that looked like a demonic Vivi (from Final Fantasy 9) that started attacking us by sweeping lasers and bullets across the field, forcing us to work together against it.

I don't remember much else, only that the whole thing was a bizarre fusion of Nier:Automata, Zelda, early Resident Evil, and Final Fantasy. I've not played any RE or many FF games, but I exposure to youtube video essays may explain where the influence comes from. However, I've completed N:A front-to-back twice.