Luisa, I think it depends on the recipe as to what you could substitute
As far as I know there is no one apples-to-apples substitute for mushrooms. In some recipes olives might work, in some recipes cooked wild rice or lentils or chopped up grilled peppers or eggplant- even cooked egg, tofu or seitan. It just depends on what other flavors and textures are in the dish.
Cooked wild rice especially has that "earthy" taste like mushrooms.