There are two types of polio vaccine: inactivated polio virus (given by a shot) and oral polio virus (OPV). OPV is a lot easier to give in rural and impoverished areas, or areas where it may be difficult for healthcare workers to get access. However, because it's given orally there's the chance that the recipient (while immune themselves) may continue to replicate and carry the virus in their intestinal tract. They may then pass the virus in their feces.
In an area with a functioning sewage system, this is generally a negligible risk. In an area where everyone is vaccinated and has a functioning immune system, this is generally a negligible risk. In an area where possibly not everyone is vaccinated, or where people's bodies are starting to break down due to starvation, and where the sewage system has been deliberately blown up, this is almost inevitable.
This is also intentional. In the concentration camps, a significant portion of the deaths were due to diseases that ripped through the camps, where the inmates were severely and deliberately malnourished, chronically overworked, had minimal protection from the elements, and were provided little hygiene or healthcare. The only difference with Gaza is that it's a bigger camp, and instead of being overworked, the inmates are repeatedly forced to move from one area to another to another.