Yes, hamsters can eat rolly pollies (bugs).
Rolly pollies are nutritionally healthy for hamsters. They are a great source of protein and although they have more fat than some other bugs, it is good fat.
Generally, any bug you find outside is safe for your hamster to eat, but insects with wings can be dangerous if they eat the insect’s venomous legs or wings.
On the other hand, you should not feed your hamster any kind of bug that has been found in or around something toxic (such as an outdoor plant with pesticide on it).
Other than that, bugs are a good source of protein for your hamster so providing they eat most types of bugs and do not overeat them, they will be fine.