Preheat the oven to 375°F (190°C) and lightly grease a casserole dish.
Heat olive oil in a skillet over medium heat. Add the onion and cook until softened, about 4 minutes. Stir in the garlic and cook for 30 seconds.
Add the kale and cook until wilted, 2 to 3 minutes. Remove from heat.
In a large bowl, mix the chicken, artichoke hearts, sour cream, cream cheese, Parmesan, 1/2 cup mozzarella, salt, pepper, and red pepper flakes if using.
Fold in the cooked kale mixture until evenly combined.
Spread the mixture into the prepared casserole dish and top with the remaining mozzarella.
Bake for 30 to 35 minutes, until hot and bubbly and the top is lightly golden.
Let rest for 5 minutes before serving.