Preheat your oven to 350°F (175°C).
In a large mixing bowl, combine the chopped spinach and artichokes.
Add the softened cream cheese, sour cream, mozzarella cheese, and Parmesan cheese to the bowl.
Stir in minced garlic, salt, black pepper, and red pepper flakes if using.
Transfer the mixture into a greased baking dish.
Bake in the preheated oven for 25–30 minutes or until bubbly and golden.
Remove from the oven and let it cool slightly before serving.
Serve warm with tortilla chips, bread, or fresh vegetables.