WD40 isn't good for rubber.
There are rubber seals on the rear wheel.
Also WD40 will dissolve grease so if it gets into the bearings, that's not good.
It is fairly waterproof into the bearings so I would think if you took the rear wheel off, you could clean off whatever is making it squeak, and pack a little grease into the seal.
JMO