The fact that Scout recognizes Mayella's loneliness is an example of what theme regarding education?
In terms of Scout's broader education in life (not just in school), one of the lessons she learns is to consider the life, struggles, and perspectives of other people. Earlier in the novel, she, Jem, and Dill make fun of Boo Radley. They do not stop to think that Boo may be hurt by this until Atticus tells them to stop. They only really stop when it gets old. But Scout doesn't truly consider Boo's feelings until the end of the novel.
With Mayella, Scout does realize the value of considering the feelings and perspectives of others. She expresses sympathy for Mayella. Like the other Ewell children, Mayella has not completed school. So, she has no friends from school and no friends outside of her home. She is the functional mother of the Ewell household and is burdened with raising the younger children while her father drinks away their welfare check. Scout considers this in Chapter 19:
As Tom Robinson gave his testimony, it came to me that Mayella Ewell must have been the loneliest person in the world. She was even lonelier than Boo Radley, who had not been out of the house in twenty-five years. When Atticus asked had she any friends, she seemed not to know what he meant, then she thought he was making fun of her.
This is during Tom's testimony. When Mr. Gilmer questions Tom, he (Tom) notes that he would help Mayella because he felt sorry for her. Tom is one who considers the feelings of others. He knew Mayella was lonely. He didn't know she would try to seduce him. He simply helped her because she was lonely, had no friends and had a hard life.