Well, it is a bit more with Ged, I think. Other than Ogion, up until he gets to the school he has not really experienced very much kindness or generosity. He has known harshness and cruelty and neglect. Is it any wonder he is so self-absorbed? The kid has known little else in his life...
Here is this very impoverished child (impoverished in many different ways) who is hungering for attention and security. Being a wizard - a great wiizard - is his key to getting attention and adulation - and also for the power he can use to bring about his own security, wealth, pretty women, etc.
Since his basic emotional needs were so seldom met as a very young child, and since other than Ogion there have been so few positive role models for him to emulate, it seems pretty normal to me that he would act in the way he is.
He does not understand - but what has gone on in his life thus far that he could even have a basis for understanding?
And I should add - while I brought up Harry Potter and Hogwarts - there, is, of course, a huge difference between the School at Roke and Hogwarts. And that is that Hogwarts has plenty of female students and teachers. They are conspiculously absent on Roke, even though we already know from the first two chapters that women are capable of doing magic on Earthsea...