01 - Preheat the oven to 375°F. Lightly grease a medium baking dish with butter or cooking spray and set aside.
02 - In a large skillet, heat olive oil and butter over medium heat. Add the diced onion and sauté for 3 to 4 minutes until translucent. Stir in the minced garlic and cook for 1 minute until fragrant.
03 - Add the chopped spinach to the skillet and cook, tossing gently, for 2 to 3 minutes until completely wilted.
04 - Reduce heat to low. Pour in the heavy cream and add the cream cheese, dried thyme, salt, and black pepper. Stir continuously for about 3 minutes until the sauce is smooth and slightly thickened.
05 - Remove the skillet from heat. Fold in the cooked cubed chicken, half of the mozzarella, and half of the Parmesan. Stir until evenly combined.
06 - Transfer the entire mixture into the prepared baking dish, spreading it into an even layer. Sprinkle the remaining mozzarella and Parmesan over the top, followed by the breadcrumbs if using.
07 - Bake uncovered for 20 to 25 minutes, or until the cheese is melted, golden brown, and bubbling at the edges.
08 - Remove from the oven and let the casserole rest for 5 minutes to set before serving hot.