Anything that has a mass close to the mass of the neutron would work better because we'd want to have a lot of elastic collisions to slow neutrons down. So something with lots of hydrogen would work, since the nucleus of hydrogen is a single proton so about the same mass as a neutron. It would mean water works. But so does polyethylene and it can be molded into various shapes and doesn't leak like water.
Another way to think about it is lead is heavy nucleus, imagine it like a bowling ball. A neutron on other hand are more like tennis balls. A fast flying tennis ball hitting a bunch of bowling balls will not slow down too much and will keep bouncing around at at high speed.
Now imagine this fast tennis ball hitting lots other tennis balls. Then the collisions are more elastic and it will slow down the neutron quicker.
People make so much hay about the curious non-locality and uncertainty of spin, and tend to get tunnel vision about how nothing makes sense anymore, leaving out the broader strokes which have pretty reasonable underlying principles.
But a hydrogen nucleus is just a proton, and thus about the same mass as a neutron. So this results in lots of energy transfer, just as with billiard-balls hitting one another.
Like many plastics, polyethylene has lots of hydrogen atoms. Sticking them onto a carbon spine is a very efficient way to pack lots of hydrogen nuclei into a given volume of space.
There are two super interesting things that are relevant to neutron scattering off of Hydrogen nuclei (protons). One is that due to quantum effects the de Broglie wavelength of the proton is larger than for other nuclei (partly due to the standard inverse relationship between energy and wavelength). This means that protons are a much larger "target" than more massive nuclei in terms of neutron scattering, which is a bit opposite of what you might imagine from a non-quantum perspective. Additionally, protons and neutrons are nearly the same exact mass, within single digit percentage points. Now, let's say you take a tennis ball and you throw it at a wall, it'll bounce off the wall at nearly the same speed, right? And almost exactly the same thing will happen if you throw it at a bowling ball. This is just the way momentum and kinetic energy works. But if you throw a tennis ball at another tennis ball and you hit it dead on then you'll transfer all of the momentum from the first ball to the second, just as in a Newton's Cradle or in a game of billiards.
Those two facts together mean that Hydrogen nuclei are super good at slowing down neutrons. They are much larger targets to the neutrons and when neutrons scatter off of them the neutrons tend to lose a lot of their momentum. So it doesn't take many scatterings before the neutrons are no longer at ionizing energy levels and aren't dangerous to humans (they will decay with a half-life of several minutes into protons and electrons (and neutrinos)). Meanwhile, those protons will get a ton of momentum foisted onto them, but they are charged particles moving through atomic matter chock-a-block with other charged particles so they don't get far. The net result is that neutron radiation is blocked.
Polyethylene is basically (CH2)n so it contains lots of Hydrogen atoms (water is also a good neutron moderator/blocker). Additionally, Carbon is also one of the better neutron moderators, so the combination is pretty effective.
On the other hand, lead is just a bunch of heavy nuclei. Which aren't actually that "big" from a neutron's perspective due to quantum effects, and most of the time when a neutron hits a lead nucleus it's just going to ricochet and maintain almost 100% of its original speed/energy, so you need a lot of lead to make a difference.