Accepting songs from others when you're in your early 20s and less experienced isn't the same as when you're in your 40s and should be more experienced. MJ did the best he could on Off the Wall and Thriller, but not on Invincible.
As far as quality goes, "Whatever Happens" was as good of a commissioned song as they come. That doesn't make up for the fact MJ didn't write or produce it, though. It sounds really good, but at the end of the day, it doesn't feel genuine. And this isn't hindsight bias, because Santana's presence is a dead giveaway that this was only made to be an easy hit single.
This isn't to say there's a direct link between MJ having more input and the quality of the music. He wrote and produced "Speechless" and "The Lost Children" by himself, but those are too corny (and I could do without "The Lost Children" entirely). The biggest issue with Invincible is that not only are most of the songs not very good, but none of them feel personal enough. No amount of improved sequencing would fix this. There's nothing as haunting as "Who Is It" and "Stranger in Moscow", or as resounding as "Leave Me Alone" and "Earth Song". The best song that actually feels authentic is "Speechless", but again, it's too corny.
"Days in Gloucestershire" is the type of song Invincible needed.