Here is evidence of Hamas telling Palestinians to stay put
This needs context, because it’s even more complicated. They’re worried about a second Nakba, if Palestinians evacuate they will likely never be allowed to go home.
Here is evidence of Israel giving 24 hours notice before bombing and saying that the bombings will not stop until all hostages are released
And zero guarantees that the bombings won’t resume after the hostages are released. Giving up their only leverage would be foolish. By keeping the hostages they are strategically destabilizing Israel, because it makes Israelis unhappy with their government. Knowing your government is going to kill your family has an effect on people, regardless of the reasons.
Here is evidence that neighboring countries do not want Palestinian refugees
Again, more complicated. They can’t handle a million+ extra people, especially when they’d be coming with nothing but the clothes on their backs. The burden of a refugee crisis could actually collapse Egypt, they can’t afford this.
If Israel gave a shit they’d take refugees into Israel itself.
It’s complicated, but it’s not inexplicable.