Preheat your oven to 375°F (190°C).
In a large mixing bowl, combine the shredded chicken, marinara sauce, ricotta cheese, garlic powder, Italian seasoning, salt, black pepper, and red pepper flakes. If using spinach, fold it into the mixture.
Spread the chicken mixture evenly in a greased 9x13-inch baking dish.
In a separate bowl, mix the almond flour with olive oil until it resembles coarse crumbs. Sprinkle this mixture evenly over the chicken casserole.
Top with shredded mozzarella cheese and grated Parmesan cheese.
Bake in the preheated oven for 25-30 minutes, or until the cheese is bubbly and golden brown.
Let it cool for about 5 minutes before serving.