Is it possible to simulate the distribution areas of earthworms taking into account climate change using MaxEnt, if the soil environment is more stable than the ground-air environment
sure, it is, but you'll need data (prediction) for the future soil variables to be able to make future prediction of suitability by your trained MaxEnt model.
You can definitely model the ditribution of earthworms under the assumptions of climate change.
In the same way you can model their distribution under current climate conditions (for example using the Worldclim variables https://www.worldclim.org/data/bioclim.html), you can do the same by using the precited values for those variables in the future https://www.worldclim.org/data/cmip6/cmip6climate.html
If you wanted to use soil variables you would need predictions of those variables in the future (as Ákos mentioned), but that's not mandatory (maybe not even necessary).