They were, for me at least, too different to compare like that.
TNG was the hopeful future - something an idealist would like to imagine society could achieve.
Babylon 5 was the realistic future - where fascism and racism are issues still prevalent in society, but largely left unaddressed.
If you ask me to pick between them I'd have to go with Babylon 5 but only because of the writing. There were so many times that JMS foreshadowed events literal years in the future on the show and it was such a huge payoff as a fan.
Star Trek just wasn't structured as a show in a way that can compete with that level of world building that was all interwoven in the same kind of way.