I agree with you that "had" sounds better than "did", but "did" is not wrong, and the reason "had" might sound better has nothing to do with time frames. It only sounds better because the "perfect" tenses work especially well when you are discussing experiences, and "having studied" is an experience.
The simple past of any verb other than "to be" can be used in the past subjunctive mood to create a counterfactual meaning. So "had" and "did" are both correct.
Neither is really necessary because "studied", being the simple past, can also be used in this counterfactual way:
"He wouldn't be so successful now if he studied less when he was at school." (good)
"He wouldn't be so successful now if he had studied less when he was at school." (also good)
These two correct sentences are almost identical in meaning, but the second might sound better because it uses a perfect tense to describe an experience.
Subjunctive mood is timeless. By itself, it is not past, present, or future.