Establishing a refugee camp which can hold a population of 2 million from the ground up would have taken too much time and cost far too much. Also, you underestimate the size of this camp, and thus the amount of troops required to guard its borders and make sure no weapons or Hamas fighters are smuggled in.
It would be a monumental undertaking, yes. But it would also be completely feasible. Saudi arabia has 3 million capacity in its hajj camps with 100,000 air conditioned tents in Mina alone
What requires more blood and treasure- building and guarding such a camp, or the multi-year invasion of Gaza and urban fighting? If a camp was starting from scratch and entry strictly done under guard, it wouldn't be a battle from within, it would be more like an open air prison and we've seen some massive prisons cleaning up south/central america being similarly effective. Israel would be dealing with issues like "Hamas is flying drones to airdrop weapons inside the camps", but that seems manageable.
The gazan war dragging out and becoming an expensive bloodbath was completely predictable and Israel is losing more than they would with full measured action to end Hamas. In classical times, simply massacring the Gazans would have been the effective answer. Yet an ethically guided military can be so adverse to short term harm and bad optics that it winds up causing more death and destruction than if it had taken more permanent and decisive measures, and displacing a population would have killed far less people than bombing in and around them in whackamole style.