Two (somewhat inchoate) components (and there are others):

1) Fulfillment of purpose
2) Fitness of purpose

1) This answers the question "How well does it deliver on its claimed goals?" Which presupposes answers to the questions
1a) What are its purposes or goals?
1b) Who are its target audience?
1c) What measurements are there for testing this fit?

There are generally multiple goals, including the ones inherited from the genre level--being a Role-playing Game. Something that's not a good game isn't a good RPG; something that doesn't assist or encourage role-playing isn't a good RPG. But purpose is broader than that.

A statement of (one of) 5e D&D's purposes might be "Enable and empower creation of small-team based adventures in a fantasy world", while another might be "be more friendly to new players (than earlier editions)", while a third might be "make Hasbro lots of money" and a fourth might be "feel like D&D". Note: I'm not employed by WotC, nor do I speak for them. These are my impressions as to their aims, as expressed in their product.

2) This answers the question "is what it's trying to do important or interesting to me?". This one's quite subjective. For instance, you might have a great WWI trench-fighting RPG. Portrays life excellently, has wonderful mechanics, real gritty, etc. Does its job excellently. And I'd totally pass it over, because I'm not interesting in roleplaying in a WWI environment. That doesn't make it bad objectively, just bad for me.

I reject the idea that good systems have to be universal. I prefer when systems know who they're targeting and what they're trying to do. And then do it. And especially advertise what they're going for. Trying to be universal and failing (which everyone does, universal is basically impossible even within a single genre) ends up leaving you neither fish nor fowl nor good red beef, as the saying goes. Choose what you're going to do, then do it well.

Now if you narrow your focus too much, you'll not find players. Which may make it a commercial failure. But lots of "good" products are commercial failures. They were produced well, just not for the right market. Or things shifted out from under them. And conversely, a lot of commercial successes aren't objectively all that good.