That's a slight mix of cause and effect. There is a shortage of construction material because Hamas uses it not for the wellbeing of the citizens of Gaza, but for the construction of border crossing tunnels into Israel.
Regardless, my original point stands that Hamas do not have the means and resources both to build public shelters for everyone and to continue its military efforts.