In a general sense?
Well, it's a little hard to tell.
You can see all the streamers/youtube commentators who play hours worth of game footage on end, showing it off to their fans/followers. There are pleeenty of children/teens who love video games, and become addicted to them at a young age. (And they have all the time in the world).
But as Sword_of_Dusk said earlier, there's also a lot of general public adults who simply do not have the time/obligation to play long games. But see, that doesn't necessarily mean the game itself is bad either.
There are plenty of games that have quests where you could invest hours into them by playing them over and over again. Like Final Fantasy 1, where there is so much variety to your starting party, you can play the same adventure in so many different ways, and that is entertaining for some people.
There's Persona 5 where the average amount of time to complete the entire game itself is around 100 hours, but it's mainly 1 focused narrative, and people can keep wanting more of it until they finish the game. It's been highly praised since the recent re-do with the whole Royal Edition.
See how different the 2 games are? I'm sure there are plenty of other examples as well for comparison sake.
But to answer your question, I don't think there is a "general" way to tell if longer games = bad games. There are too many variables in the individuals themselves, and whatever the game itself could theoretically entail.
Think of it how when you're asked to write a paper for a class. When a length isn't specified, sometimes that is a given that length does not matter, but the quality of the paper is what matters more.
I think the safest thing to say with absolute certainty is that a game is only as good as its content.