01 - Preheat oven to 375°F. Grease a medium casserole dish with olive oil or cooking spray.
02 - Heat olive oil in a large skillet over medium heat. Add onion and sauté for 2–3 minutes until translucent. Add garlic and cook for 1 more minute until fragrant.
03 - Add diced chicken to the skillet. Season with salt, pepper, thyme, and basil. Cook for 5–6 minutes, stirring occasionally, until chicken is no longer pink and is cooked through.
04 - Reduce heat to medium-low. Stir in softened cream cheese until fully melted and the mixture is smooth and well combined.
05 - Add chopped spinach to the skillet. Cook, stirring continuously, for 2–3 minutes until all the spinach is wilted and evenly distributed.
06 - Pour in heavy cream. Add half of the mozzarella and half of the Parmesan. Stir until the cheeses are melted and the sauce is smooth and creamy.
07 - Transfer the entire mixture to the prepared casserole dish, spreading it evenly. Top with the remaining mozzarella and Parmesan cheeses.
08 - Bake uncovered for 20–25 minutes, or until the edges are bubbly and the cheese topping is golden brown.
09 - Remove from the oven and allow the casserole to rest for 5 minutes before serving. This helps the sauce set for easier portioning.