Preheat your oven to 375°F (190°C). Lightly oil a baking dish or line it with parchment for easy cleanup.
Slice a pocket into the side of each chicken breast without cutting all the way through. If the breasts are thick, you can gently pound them to an even thickness, about 1/2 inch.
In a skillet over medium heat, warm the olive oil. Add the mushrooms and a pinch of salt, cooking until they release their moisture and begin to brown, about 4–6 minutes.
Add the garlic and thyme, cooking for another minute until fragrant. Stir in the spinach and cook until just wilted. Remove from heat.
In a small bowl, mix the cream cheese (or ricotta) with half of the mozzarella. Fold the mushroom-spinach mixture into the cheese until well combined.
Season the chicken pockets with a pinch of salt and pepper. Stuff each pocket with the mushroom-spinach filling, securing with toothpicks if needed.
Place the stuffed chicken in the prepared dish. Spoon any remaining filling over the top and sprinkle with the remaining mozzarella.
Bake in the preheated oven for 25–30 minutes, or until the chicken reaches an internal temperature of 165°F (74°C) and the cheese is golden and bubbly.
Rest the chicken for 5 minutes before serving. If you like a little extra color, broil for 1–2 minutes at the end, watching closely so it doesn’t burn.