Wasn't Nier this whole constantly depressing apocalyptic stuff which makes Neon Genesis Evangelion look like a walk in the part and is like way way more on the cynic side of things than KH would ever allow?
It's interesting because NieR is the anti-RPG in that it takes common themes in your standard JRPG and flips them on their head.
Both NieR and KH explore a number of similar metaphysical and philosophical themes:
Existence, humanity, friendship, what a soul/heart is.
While Kingdom Hearts explores it in a way that is very lighthearted and hopeful, NieR uses these themes to show the futility of life.
In NieR, there is no right or wrong. No good or evil. It is just people who are trying to fight for what they believe in and who they love, and sometimes that also happens to doom all of existence. The monsters aren't monsters and the humans aren't human but every single being is alive and has something they want to protect. There is hope, yes, but it futile because everything is doomed in the end.
Kingdom Hearts goes out of its way to define what is right and wrong...what is light and dark. It does not have "happy" endings, but it does show that there is always hope for one...and generally the cost of those endings falls on the heroes of those games. The universe gets saved and only the hero like Sora gets fucked over...but these heroes believe in their friends and the good in the universe, so they will survive to see another day somehow.
It's like...fundamentally at their core, both series are addressing similar concepts, but the way Yoko Taro and Tetsuya Nomura approach these concepts is just so different.
I think you could very easily have a NieR world in KH because of these concepts, but I also think the tone and the answers to its philosophical questions is where the two franchises clash the most and that is really the crux of the issue.
Like, you'd have to make a very sharp turn with KH's overall themes and outlook if you want to justify such a bleak setting with constant unhappiness and tragedy being there and imho none of the KH characters would be mentally equipped enough to deal with it.
I read it is somehow connected to the Drakengard series and while I only ever actively played the second one of that series that one was already quite non-fitting with KH themes and setting wise.
Drakengard is a much darker world than NieR, I'd say. It's much more fatalistic and bleak because it is a world that is explicitly doomed to suffer.
NieR is chipper in comparison lol
But yeah, TL;DR it's...the themes aren't the issue. It's just the execution that differs.