I don't have any information about this specific hospital, but since 1951, it's been part of Israeli law that "all homes, residential buildings and industrial buildings in Israel are required to have bomb shelters." (quote from Wikipedia).
So it is highly likely that the hospital has some kind of underground shelter which was constructed to comply with Israeli law when the area was under Israeli control. I believe such things are also registered with the appropriate government department, so the IDF would know what it originally looked like.
Of course, since Hamas has been in control of the area since 2007 and thus the hospital was no longer subject to Israeli law, it could have been drastically altered, but the original shelter was almost certainly Israeli.