In other Shimano groups, those washers are dust covers. They reduce the amount of dirt intruding into the bushing - that's the thing that the pulley wheel turns on. Bushings are cheaper alternatives to ball bearings. For use cases like pulley wheels, which are under very low load, they are perfectly sufficient. Dura Ace (and probably XTR) uses ball bearings. I've never had my hands on a pair of DA jockey wheels, but I assume the bearings would have a rubber seal, presumably in addition to the dust cover.
The RD-M340 is the Acera RD, which is a lower end group. I don't have my hands on an Acera RD, but in Googling for replacement jockey wheels, the stock Shimano units look like they have those dust covers. They're also very cheap, so if that dust cover is really missing, then I would replace the jockey wheels.