Prep the oven and pan: Preheat the oven to 400°F (200°C).
Lightly grease a 9x13-inch baking dish or similar casserole.
Season the chicken: Pat the chicken dry. Season generously with salt and pepper on all sides.
Sear the chicken: Heat the oil in a large skillet over medium-high. Sear the chicken in batches, 2–3 minutes per side, until lightly browned.
Transfer to the baking dish. The chicken will finish cooking in the oven.
Sauté the aromatics: Lower heat to medium. Add butter to the skillet.
Stir in shallot (or onion) and cook 2 minutes until translucent. Add garlic and cook 30 seconds, just until fragrant.
Cook the mushrooms: Add sliced mushrooms and a pinch of salt. Cook 5–7 minutes, stirring occasionally, until they release their moisture and edges start to brown.
Build the sauce: Stir in Dijon and thyme.
Pour in chicken broth, scraping up browned bits. Let it simmer 1–2 minutes.
Make it creamy: Reduce heat to low. Whisk in cream cheese until smooth, then stir in heavy cream.
Simmer gently 2–3 minutes to thicken slightly. Taste and adjust salt, pepper, and red pepper flakes. Add lemon zest if using.
Add greens (optional): Fold in chopped spinach and cook 1 minute until just wilted.
Assemble the bake: Pour the mushroom cream sauce over the chicken in the baking dish.
Sprinkle evenly with Parmesan, then top with shredded mozzarella or Gruyère.
Bake: Place uncovered in the oven for 18–22 minutes, until the cheese is bubbly and lightly golden and the chicken reaches an internal temperature of 165°F (74°C).
Rest and serve: Let it rest 5 minutes. Spoon into bowls or serve over cauliflower rice, zucchini noodles, or sautéed greens.