I am not sure on the safeness of earwigs for bearded dragons to eat. However it isn't safe to feed wild caught insects. Many may have come in contact with insecticides and this toxin does build up in the system and eventually poison your dragon. As many bugs travel a great distance in their foraging attempts (especially winged bugs) it is very difficult to know if they have come in contact with insecticides. Also sprayed insecticides can remain airborne for a fair distance, depending on wind conditions.
Also, certain insects are deadly to bearded dragons, especially fireflies. In the day time these can be difficult to identify as they are soft bodied beetles and look like several other beetles. Not to mention there are many beetles that actually imitate fireflies.
It is much safer to feed insects specifically bred to be used as feeders. Many of these are easy to breed in the house as well. Silkworms, butterworms, hornworns, several species of roaches, crickets and superworms are all available to be used as feeders and are good feeder insects. It is also great to offer a variety of insects to your dragon, just as it is important to offer a variety of greens.
Speaking of greens canned string beans are useless to feed. The canning process leaches out all the nutrients out of string beans (or at least I find canned string beans tasteless and mushy...like straw soaked in salt water). Frozen string beans (or fresh string/green beans) are best to feed to your dragon. However, green beans are not a staple vegetable and should be offered along with staple greens such as: dandelion greens, collard greens, etc.
Dandelions, both leaf and flower, are excellent foods for your bearded dragon. Just make sure you harvest them from lawns or areas that do not get sprayed or could have come in contact with, insectivides or herbecides.