Meanings
The sentence is correct as is. If you change the tense to past perfect, it's also correct, but the meaning is different.
If I really wanted to study, I would have attended all classes.
With the simple past, it roughly means "In general, I'm a person who doesn't want to study, so I didn't attend my classes."
If I had really wanted to study, I would have attended all classes.
With the past perfect, it means "Back then, I didn't want to study, so I didn't attend my classes." This allows for the possibility that I now want to study.
Grammar
The conditional forms first, second, third and zero don't represent how conditionals really work.
Those conditional forms only apply when the time of the "if" clause is the same time as the "result" clause (the main clause).
Named conditional types:
- Zero: general present + general present (real)
- First: present/future + present/future (real)
- Second: present/future + present/future (unreal)
- Third: past + past (unreal)
But what happens if the condition is in one time ("I don't want to study"), but the result is in another time ("I didn't attend my classes")? This is where the list of "official" conditional types breaks down.
The reality is, there are only two types of conditional: real and unreal. If your grammar is good enough that you know the meanings of the basic tenses, you know how to change "real" clauses into "unreal" clauses, and you can do that with "if" clauses too, then you can create any kind of mixed time conditional you want.
In your example, the condition is present, the result is in the past, and the whole thing is in the unreal, so...
["I" + "not really want to study" + unreal + "if"] ==> "If I really wanted to study"
["I" + "not attend my classes" + unreal] ==> "I would have attended my classes"
Combine them and you get a natural conditional:
If I really wanted to study, I would have attended my classes.
Odd as it sounds, you can even express future conditions with past results:
We'll watch from here, and if she flashes the light twice (future), it means she left the back door open (past).
The only new rule is: both clauses must be real or both clauses must be unreal, real and unreal cannot mix.