There is nothing illegal about it as far as the FAA is concerned. If you do not meet the academic standards set by the school, they can make you repeat any course that you have failed according to their criteria for achieving a passing grade. If you don't like it, too bad. Study harder. Your only other recourse is to drop out and go to an independent flight school.
However, your question is unclear about what you mean by "meeting the FAA minimums". Obviously, if you pass the FAA check ride for a license, you've met their "minimums", and if you've failed you haven't. If you are talking about having met the minimum flight experience requirements for a particular license or rating, that is something else again. You could easily have more flight hours than required yet you might not be proficient enough to pass a checkride, in which case no school would approve you for the FAA flight test.
However. I'm wondering if perhaps you are talking about failing a Part 141 "phase check", which is not an FAA check ride. If you've failed the phase checks, there is no way they would sign you off to take an FAA check ride. Part 141 university flight schools do not want their students to fail FAA check rides because it reflects badly on their reputation, so they may actually have a stricter performance standard in their phase checks than the FAA has set for a particular flight test. That is not uncommon. I know of college flight students that have spent more than $15,000 USD and 80 flight hours just getting their Private Pilot certificate because they kept failing the Part 141 "phase checks".
Whatever the case, in your university flight program, I'd be surprised if you would have to do an entire course over flight hour by flight hour. Most likely they will just charge you for whatever academic credit hours the course is worth and then for whatever extra flight time you need to become proficient so you can pass a check ride and pass the course. That's how it works at the university programs I'm familiar with.
You should be aware that if you've failed an actual FAA checkride more than once , it's potentially going to hurt your career as a pilot. The Airlines are very skeptical of applicants who have multiple written test or checkride failures on their record. All failures become a permanent part of your airman record and will show up on a background check required to be performed by every airline in the country. If you've failed more than 2 FAA check rides, or any Part 135 or Part 121 check rides, or any type rating check rides, don't expect any airlines to invite you to an interview.
You should also be aware that getting a "professional pilot" type of college degree will not enhance your ability to get most flying jobs. Except in some government flying jobs it will not not make you more competitive than pilots who have non-aviation degrees. Most employers couldn't care less about aviation degrees. As long as you hold the required pilot certificates and have a competitive amount of flying experience, and you have impeccable references and a personality they can tolerate, that's what matters. You could have a degree in agriculture or history and it would be just as valid as an aeronautical science degree as far as meeting the college degree requirements of every airline in the United States.