The same legal basis that allows for leagues to set rules of how much experience you need to even enter.How do you legally stop someone who wants to be a professional student-athlete from doing that for 20 years? Just keep getting new bachelor's degree after another. In good academic standing. School wants them, team wants them. What's the legal basis??
A school can decide who is and who is not going to play for them. Courts can't force the U of M to accept a player, give them a scholarship and play them. (except in rather extreme circumstances) Same with the Big Ten, they can regulate eligibility however they choose as long as it doesn't run afoul of specific rules either set by the NCAAs or the government. (who is not going to waste time setting up laws on this) The Courts dont have the authority to force the issue.
Put it this way the Courts could say "there is no restriction under the law that says players are only eligible for so many years" but that doesn't mean the Big Ten has to let players play for all those years. (especially when those players would have other avenues like other conferences or lower levels of play not to mention the NFL) The Big Ten could easily set up eligibility guidelines that set about to say what the requirements are to be a Big Ten player. (whether they would do that is another story) If players don't like it they dont have to play in the Big Ten. Being an athlete is not some protected class and it never will be.