I think that some of the lessons learned by Edward and Tom are moral lessons.
I believe that one lesson that both boys learn is to not make immediate, snap judgments based on only outward appearance. In other words, they learn that it's unwise to "judge a book by its cover." Both Tom and Edward make initial assumptions about the other person and the life that he lives. Both boys initially assume that the other person has certain advantages. They each believe that the grass is greener on the other side of the fence. That's why the idea of changing places is so appealing.
"Oho, wouldst like it? Then so shall it be. Doff thy rags, and don these splendors, lad! It is a brief happiness, but will be not less keen for that. We will have it while we may, and change again before any come to molest."
However, after switching places, both boys realize that their initial thoughts were erroneous. They have learned that each of their lives come with both advantages and disadvantages.
I believe that another lesson both boys learn is a lesson about power and responsibility. Throughout the novel, Edward is bombarded with the injustices created by his father. As he matures, Edward realizes that his royal position can be used for more than selfish gain. He realizes that he can use his position to help other people. He learns the same lesson that Peter Parker's uncle tried to teach Peter -- "With great power comes great responsibility."
The king was cheerful and happy now, and said to himself, "When I am come to mine own again, I will always honor little children, remembering how that these trusted me and believed in me in my time of trouble; whilst they that were older, and thought themselves wiser, mocked at me and held me for a liar."
In the “Prince and the Pauper” by Mark Twain, the boys learn universal life lessons. Prince Edward VI, Eddie, rescues a pauper child named Tom Canty. The two boys trade places in life when the Prince decides that he wants a taste of freedom. What the Prince receives is a lesson on how his father’s subjects live when they are poor. He learns how harsh the laws of the kingdom can be and how it is to live in poverty with an abusive father.
On the other hand, Tom Canty learns how to live like a prince. At first, he does not like his new situation since he is ignorant to the lifestyle, but he later changes his mind. He learns that in time he would be able to influence lives by modifying laws.
Both boys learn to respect themselves and to show compassion for others from different classes. In addition, they find to value their own situation. One might say the moral is that “the grass is not always green on the other side of the fence” or “life is what you perceive it to be.” The most important lesson is that social injustice exists and it can be changed by working in a unified matter to procure change.