You are correct. On the surface, students who attend schools that design difficult exams may perceive this as being unfair when compared to students in other schools where exams may not be designed to be as difficult, therefore allowing the latter to achieve higher marks than the former. However, the mark values themselves do not matter, the rank of a student relative to their cohort in a particular subject that is reflected by those marks is the element that matters.
Essentially, moderation is a process that takes into consideration a student's rank relative to their cohort in a particular subject in determining their Assessment Mark (being the mark that reflects a student's internal performance, and contributing 50% of their overall HSC mark for that subject). In doing so, moderation also involves using students' Examination Marks (i.e. HSC exam marks, which contribute the remaining 50% of their overall HSC mark for that subject). The basic premise is that the highest Assessment Mark in the cohort is adjusted to equal the highest Examination Mark of any student in that cohort and vice versa (i.e. the lowest Assessment Mark in the cohort is adjusted to equal the lowest Examination Mark of any student in that cohort). Consider the following example:
Student A has performed consistently well in their internal assessment tasks and exams in a particular subject, allowing them to place first in their cohort. Because Student A was able to place first, the highest Examination Mark achieved by any student in their cohort (including Student A) will also become Student A's Assessment Mark. For instance, if the highest Examination Mark of 95 was achieved by Student B, Student A will also receive 95, but as their Assessment Mark, because they placed first internally.
Another student, Student C, also performed well, although not as well as Student A, and was able to place third overall. The third highest Examination Mark in the cohort was 90. Here, the aforementioned basic premise may not necessarily apply (because we are no longer dealing with the student ranked first), meaning that Student C will not necessarily receive 90 as their Assessment Mark, although their Assessment Mark will be similar. It could, for instance, be 89.
The point of the example is to focus on the important notion that, the higher your rank, the more likely you will be to maximise your Assessment Mark, and the better the position that you will be in as you approach your HSC exams.
The fact that you attend a highly-ranked school means that your cohort is academically capable, which is a good thing because you may not need to rank as high as you may at a lower-ranked school to still achieve a favourable Assessment Mark.
An important thing to note is that your own Examination Mark in a particular subject will be determined according to your own performance in your HSC exam for that subject. It is therefore unaffected by factors such as your rank relative to your cohort or your school rank.
I hope this helps!