Sauté onion, mushrooms, garlic, thyme, and red pepper flakes in olive oil until tender; add spinach and cook briefly.
Stir in cream cheese and Parmesan until smooth; stuff mixture into chicken pockets.
Secure with toothpicks if needed, place in baking dish, and bake for 25-30 minutes until internal temperature reaches 165°F (74°C). Rest 5-10 minutes before serving.
Notes
Use a meat thermometer to ensure chicken is fully cooked. Resting helps keep the chicken juicy.