The Israeli military has targeted a school sheltering displaced Palestinians in Gaza City.