The theme of hope is a very interesting one to analyse. You are right in saying that there is definitely some form of hope for humanity expressed through the ending, with the boy finding a new family to care for him and protect him, and referene to his keeping the "fire" burning within him. However, I would argue that actually the hope for humanity is kept alive throughout the narrative with reference to the boy and the way that he insists in believing in people, acting as a kind of moral check on his father, who would otherwise ignore his own humanity in his blinkered pursuit of safety for his son.
The biggest example to my mind is when they come across the old man in the road, who is clearly malnourished and maybe even slightly mad. The father is all for just leaving him, but it is the son that convinces him to share some of their food with him and to set up a fire for them all. It is the son's touching belief in the goodness of human nature that stands out. Notice how he is described as "someone trying to feed a vulture broken in the road" as he gives food to the old man. Again and again, in spite of the bleakness, desolation and the absence of hope that surrounds them, we see the boy's goodness shining out, such as when they encounter the thief who stole their things from the beach and the boy prevents his father from hurting him and then makes him leave some food and clothes for him. Hope is present throughout the novel--in the form of the son that survives.
Thank you very much for your answer. May I ask if you could come up with other examples of hope in the novel, besides when the protagonists find Ely and the discovery of the underground bunker. Thanks a lot for your help.