Both societies treat Gulliver as a curiosity at first. The Lilliputians "imprison" him and make him a source of entertainment. The Brobdingnagians carry him around like we might carry a small dog.
Eventually, the Lilliputians put him to work for them, and the Brobdingnagians expected his antics to generate revenue for the kingdom. In neither place did citizens treat Gulliver as an equal. The first link below is an essay that talks about how the people of Liliput and Brobdingnab considered Gulliver a "monster" and asserts that he embraced that notion.
The question about what Gulliver learned is an interesting one because one could claim that he really didn't learn anything of value until he reached the land of the Houynymnymns--and even that knowledge led him to a loathing of mankind! Gulliver did learn how to relate to a wide variety of people, and he demostrated an adeptness with language and observation. He saw the futility of trying to change the fundamental character of Lilliputian and Brobdingnagian government and ideals, but whether he really learned anything is questionable.
Well they don't exactly treat him with the respect he deserves, if you relate this to the time that Jonathan Swift was writing, you would figure out that he is criticizing the way the British are treating the Natives, without Gulliver, the Lilliputians would perish.
Brobdingnagians treat him like a play toy and detest his patriotism to a violent country, they degrade him as subhuman and put him in a box for entertainment, this all has to do with perspective and how people view each other. Gulliver learns that judging others is silly since he is not looking at others views of him, he think he's powerful (as well as Britain) and no one can be higher than him.
This is what I think Gulliver learns from each island.
What does Gulliver learn is on the island of Lilliput that he doesn't want to to die for putting out the fire in the royal place with his urine, so he escapes to blefuscu.
When at Brobdignag even though Gulliver is plucked by a eagle, he learns that he doesn't want to be in endager by animals and that the courtly ladyies that approce him; finds no interest in.
In Laputa Gulliver doesn't want to me immortal, and wants to live. At the end of the novel while in Houyhnhnms is where Gulliver learns that he is a yahoo and not a Houyhnhnms. Even though he is sad to leave he leaves due to the Houyhnhnms band him.