Clean the mushrooms, remove the stems and season with freshly ground salt and pepper. Peel the leaves from the herbs and chop finely. Cut the onion and the garlic cloves into fine cubes.
Heat the olive oil in a pan and fry the onions and garlic in it. Add the spinach leaves and let them collapse. Stir in the ricotta and let everything simmer for 5 minutes over low heat. Season with salt and pepper and stir in the herbs.
Fill the mushrooms with the spinach mixture and place in a baking dish. Pour the cream over it and sprinkle everything with the grated cheese. Bake at 200 degrees for 20 minutes.