I would not worry about it too much unless the soil had fertilizers in it. Always make sure to use regular potting soil or topsoil with no fertilizers or even natural fertilizers in it. You can also cover the soil with pebbles so he can't eat it. Or you can buy crushed oyster shells and place in the soil for the calcium content. Chameleons will eat soil and plants for sure!! Good luck and if the next day or after he refuses to eat then that's when I would be concerned. Check his poop as well.