Let's not pretend that the 2005 'withdrawal' was a chance for a fresh start for the Palestinians that they floundered. The various negotiations were very one sided, and the offers were also unacceptable.
IMO a one-state solution where everyone has equal rights is the only just and reasonable path forward. Like with the dismantling of apartheid, a transition plan will be needed.
Partition of disputed territory is the least bad solution in the world we live in. "One world" government remains a utopian fantasy. Dividing the world up according to a mix of consideration of peoplehood, self-determination, and whoever won the most recent war is what humankind has figured out so far.
People who disagree with that will want to start wars. Wars are bad.
The American civil war occurred, in part, because Lincoln decided to end the institution of slavery. I know this is an oversimplification and justifies the means with the end, but I think if "bad"-ness of the civil war is compared to the "bad"-ness of an eternity of black people being enslavement in the U.S., I'd argue the war was significantly less "bad".
I think your other point about Hamas's supposed desire to genocide Jews lacks nuance, and your resignation to a world of ethno-nationalist states is a just-so story bordering on nihilism, but I suspect addressing those enters territory of tightly-held opinion, so I will just leave it at that.
They were optimistic!
Looking at the long term history of Israel, the left was more optimistic in general about hopes for peace with the Palestinians, while the right more suspected that Arafat never really wanted peace, and was just being sneaky. But let it be noted that the Prime Minister who ordered the withdrawal from Gaza was right-wing Gen. Ariel Sharon, Likud member and previous advocate of settlements everywhere.
After the actions of Hamas in subsequent years, particularly Oct 7, 2023, that hope and optimism was completely eliminated.