Very little of what I am saying here is absolute. If you look hard enough and want to spend enough money you will be able to contradict almost everything I say. However, generally speaking:
Magnetic encoders will be more durable. The code disk and read head are harder to break.
Optical encoders will have higher standard resolutions in smaller packages. It is much easier to print/etch the grating on glass than to get a sharp cut-off on a magnetic pole.
High resolution glass disk encoders got a very bad reputation a while back. Generally speaking the disk issues they used to have are solved. Changes in glass disk material, thickness and thickness profile tends to keep them from self-destructing these days during normal operation. However, there is nothing you can do about impact resistance with a glass disk. If you hit a glass disk encoder with a hammer the glass disk will likely shatter. This isn't an issue with magnetic encoders or metal code disk encoders.
I have personally never heard of a plastic disk encoder. then again, I may have used one and not known it. I have heard of metal disk optical encoders, however. Again, with these you trade resolution for durability. The slots in a metal disk encoder are cut through the disk. You can opnly make that cut so small and so fine at the edges. I would be a little suspect of a plastic disks thermal stability. If the disk starts to warp that will induce pulse spacing errors.
Keith