If the class is graded on a fixed scale (e.g., 90% is an A, 80% is a B, ...) then I do not see how you have a complaint. Your grade is simply a reflection of what you know (or in this case didn't know). The behavior of the other students (studying the past exam solutions) means their grades are not necessarily a reflection of what they know, but that is not your concern.
If the class is graded on a curve, then your grade would be unfairly influenced by the students who had the exam ahead of time. I would be concerned if I graded on a curve. If everyone had access to the exam in advance, but not necessarily the solutions, I do not see this as manifestly unfair. That said, I would suggest mentioning your concerns to the teacher. If only some students had prior access to the exam (and possibly the solutions), than this is manifestly unfair. I would mention your concerns to the teacher and escalate from there.
As for possible outcomes, this is messy. If the teacher is unaware that only some students had access to the prior exams, they may attempt to fix the issue. What they can do depends on the department/university regulations and what the syllabus says (e.g., they might invalidate the exam, grade on a fixed scale, identify students who may have colluded). If the teacher is aware and does not care, going over their head, is likely not going to be productive, but should still be done. For example, if no rules were broken by the professor, the department chair would likely face major backlash from the faculty if they attempted to interfere with the teaching of another faculty member. More likely the chair might through out the exam or attempt to punish students for colluding. In reality, it would likely just go as a little unwritten black mark against the teacher.