We need to be nuanced in answering this question.
First, Atticus wanted Jem to spend time with Mrs. Dubose to learn what true courage was. So, even though Jem did not want to read to Mrs. Dubose, he did. At the end, Atticus revealed to Jem what he could learn from her. According to Atticus, Mr. Dubose was the bravest person he ever met. The reason for this was because she wanted to overcome her morphine addiction before she died. All 98 pounds of her struggled, even though the odds were stacked against her. Here are Atticus' words:
I wanted you to see something about her—I wanted you to see what real courage is, instead of getting the idea that courage is a man with a gun in his hand. It’s when you know you’re licked before you begin but you begin anyway and you see it through no matter what. You rarely win, but sometimes you do. Mrs. Dubose won, all ninety-eight pounds of her. According to her views, she died beholden to nothing and nobody. She was the bravest person I ever knew.”
Did Jem learn this lesson? Probably in time he did.
Second, when it comes to the rabid dog, we cannot be sure if Jem learned a lesson. On a more figurative level, the point is that sometimes people are gripped with madness, like the rabid dog. We know that we are on the right track in saying this, because the text makes this connection.
“Right. But do you think I could face my children otherwise? You know what’s going to happen as well as I do, Jack, and I hope and pray I can get Jem and Scout through it without bitterness, and most of all, without catching Maycomb’s usual disease. Why reasonable people go stark raving mad when anything involving a Negro comes up, is something I don’t pretend to understand... I just hope that Jem and Scout come to me for their answers instead of listening to the town.
Eventually, I believe that Jem learned an important lesson. Many people in Maycomb have a huge blind spot. They cannot see their racism. So, good people like Atticus are needed to advocate for what is right by challenging the madness.