A lot of garbage info is circulating about this right now. There are several videos being circulated that are fakes (old videos and not the hospital bombing).
I doubt this was IDF for the simple reason that when IDF targets a building, they take the entire building down to the ground and rarely leave anything standing. It looks like this missile caused a huge fire, which is what caused so many casualties, but did not level the building. A rocket launched nearby would be carrying a lot of fuel and would create a big fireball if it hit. Hamas shelled Haifa with its R160 rockets today. That is a long(er) range missile as Haifa is about 200 mi from Gaza.
Would IDF target a civilian hospital if they thought Hamas was using it to launch rockets or store weapons or shelter fighters, command centers, etc.? Absolutely. But if they did, they would make sure no one survived and take the building down to the ground.