Here's what we know:
* No Specific Instances: We never see a student fail and have to retake their final exams.
* Possible Scenarios: It's possible a student could fail a particular subject and have to retake the exam for that subject specifically. It's also possible a student could fail the overall O.W.L. exams and have to repeat their entire seventh year. However, these scenarios aren't portrayed in the books.
* Focus on Other Issues: The series focuses on other challenges, like defeating Voldemort, and the consequences of failing exams are not explored in detail.
Overall, while it's not impossible, the Harry Potter books don't provide any definitive instances of students repeating their final exams.