Preheat and prep: Heat your oven to 375°F (190°C).
Grease a 9x13-inch baking dish with nonstick spray or a little olive oil.
Shred the chicken: Remove skin and bones from the rotisserie chicken and shred into bite-size pieces. You want roughly 4 cups.
Cook pasta (if using): Boil in salted water until just shy of al dente. Drain well.
This helps the pasta finish cooking in the sauce without getting mushy.
Season the chicken: In a large bowl, toss shredded chicken with a drizzle of olive oil, minced garlic (or garlic powder), Italian seasoning, red pepper flakes, and a pinch of salt and pepper.
Mix the base: Add marinara to the chicken and stir. If using pasta, fold it in now. Taste and adjust seasoning with salt and pepper.
Stir in half of the mozzarella and half of the Parmesan.
Add ricotta pockets: Dollop spoonfuls of ricotta throughout the mixture so you get creamy bites in the finished casserole. Gently fold once or twice without fully blending it in.
Assemble in the dish: Spread the mixture evenly in your baking dish. Sprinkle the remaining mozzarella and Parmesan over the top.
Scatter chopped fresh basil or parsley.
Make the crunchy topping: Combine panko with melted butter and a pinch of salt and pepper. Add a little Italian seasoning if you like. Sprinkle evenly over the cheese.
Bake: Place the dish on the middle rack and bake for 20 to 25 minutes, until bubbly around the edges and the top is golden brown.
If needed, broil for 1 to 2 minutes to deepen the color—watch closely.
Rest and serve: Let the casserole rest for 5 to 10 minutes so it sets and slices cleanly. Garnish with extra basil or parsley. Serve with a green salad and garlic bread.