It definitely can be too long.
That is because some game mechanics can be nice, but get boring after a while.
Now with RPGs that is mostly not the case, or at least not to this degree.
But one of the last Games I played was Gunpoint. Whilt it was a nice game, it only lasted for about 4 hours. Gunpoint is a game about logical puzzles. Which at first are nice, but after 3h or so the diversity of what you can do with that concept was used up. It became repetitive and ended at just the right amount of time. Would it have been twice the size, it would have been to long.
The question is when you have reached the point of having seen "everything" regarding mechanics and when it becomes repitition and the only thing keeping you playing is the story. And this can also be the case in RPGs.
Lots of players say that they feel like they don't feel much motivation anymore if they hit max level. A recent example for that would be Pillars of Eternity. Fallout 3 was a much more extreme case. Both games of course had it's own flaws. PoE had some quests which gave too much XP. Fallout 3 just had a "broken" level curve alltogether so that you reached max level at not even 50% of the game. But that said even if games have a better level curve at one point you will hardly get anything new per level or at least mechanical new per level, so that you feel going into repetitiveness.
Imho the leveling curve of Might and Magic X felt ok. But the content was just more the gameplay could handle. The last part of the game was just repititive as you were almost godlike. Now with DLCs this game would have been too long for sure.
A problem RPGs have more than other games is balance. The longer a game is, the more serious balance problems are. Might and Magic became more trivial once it reached a certain point if you had a good group constellation and you knew what you were doing.
But I think the best example is Skyrim, which has horrible, horrible balancing.
In Skyrim you have so much content in the game, that you can do lots of stuff just while exploring and questing, like mastering the professions, which just provides you with a boost which make the complete game totally trivial. If Sykrim was just a 80h game, this would not have been an issue to this degree.
So all in all:
-When is the "freshness" of a game mechanic used up
-When is the amount of stuff the player has available (like skills) that anymore would be overkill or repetitive
-When do you reach a point where the balancing of the majority of the players reached a state where it is either well below the required power-state, or well above. The more freedom you give to the player the more complicated
-How interesting is the story you can tell
On the other hand there are also games which were just too short. So short that they kinda broke apart. My favorite example in this case is Shadowrun Returns.
Shadowrun returns is an extremely short game with just around 15h or so.
But it wanted to give players so many possibilities that it was impossible to implement it in just 15h of content. So most of the conversation skills only had a use once or twice in the game. If you decided to learn them at the second half of the game, and the possibility to use it, alread passed, you took it for nothing. It was also extremely obvious that they tried to add ways for every character to use the skill at encounters. So at each encounter you saw a drone shaft so that you could actually use the drone skill. If the game was longer, they would have been able to spread this out. Integrate more possibilities in the game, without compromising the games content.