How can I clean the earth and what is the pest?
Jerusalem Artichokes and Shallots Eaten by Small Grey Worms Inside Tuber
This article contains suggests a possibility: https://www.gardeningknowhow.com/plant-problems/pests/root-eating-insects-identifying-vegetable-root-maggots-and-root-maggot-control.htm
The best way to get an identification and specific treatment is to take a sample to the local Extension Service. This will help you locate one: https://www.gardeningknowhow.com/extension-search/