One last addition to this post:
I feel that in their heart, Chara always wanted to believe in Asriel. They wanted to believe that he was right in sparing the humans on the surface, hence their optimism during a pacifist run. Frisk is proving to them that no matter how hopeless or dire the circumstances seem nobody has to lose their life.
Think back to what happened in the past. Chara desperately wanted to free the monsters who had done so much for them; these people were looking up to them as a beacon of hope. In their mind that plan was the only option they had left and nothing else could possibly work. Add in a huge dose of self-loathing and guilt over the buttercup accident and… well. Perhaps they once wanted to believe in a peaceful solution, but lost sight of that after all that had happened. They lost all hope.
Frisk’s actions during a pacifist run are showing Chara that there is always a peaceful solution, even when it seems impossible. They’re showing them that Asriel never betrayed them.
Frisk is giving Chara their hope back.