The sentence is grammatically correct and natural, and a native speaker might say it.
If you pay attention to a class, it means you're focusing on the material in that class.
If you pay attention on a class, it means you're focusing during that class. It only indirectly means that you're focusing on the class material.
So it's more common to say, "... ...
Most of this is correct, but instead of They should have paid more attention on their first lecture about the law of supply and demand. it should be They should have paid more attention to their first lecture about the law of supply and demand., since you 'pay attention to', not 'on'
Both are possible. It depends on how you want to take the reader through your narrative.
The more natural choice is to use the past perfect: you are conveying to the reader what you told him, and keeping the temporal focus at that time.
If you use the simple past, you are taking the reader through the day with you.
The way it stands, the sentence sounds like you are using the unfamiliar word. If by "met" you mean that you read or heard a sentence that someone else created, then you would want to change your statement.
The simplest would be
I was confused by the unfamiliar word
... along with the context of what you're talking about, that's perfectly fine ...
There are a number of points that one could make about the writing here, but I'll focus just on your question relating to the bold items.
I remember that all my items had been packed up (were packed?)by the
time of my departure.
Both of these choices are fine. "Had been packed up" or "had been packed" in the past perfect sounds more ...
There are several issues, let's go sentence by sentence
1st sentence: change the order of the sentence, use the simple past (it happens at the same time while you remember)
I remember that by the time of my departure all my things were
2nd sentence: you move luggage, you don't really relocate it
Then I moved them to the ground floor.
Yes, Rowling has backshifted the reported speech to the past perfect. That is very natural when reporting an action that occurred in the past of a past tense narrative.
But there is practically no difference in using the past tense here.