Preheat your oven to 375°F (190°C).
In a mixing bowl, combine the cream cheese, mayonnaise, sour cream, half of the Parmesan cheese, and minced garlic. Mix until smooth.
Fold in the chopped spinach, artichoke hearts, and half of the mozzarella cheese. Season with salt, pepper, and red pepper flakes if using.
Transfer the mixture to a baking dish and smooth the top with a spatula.
Sprinkle the remaining Parmesan and mozzarella cheese on top.
Bake in the preheated oven for about 20-25 minutes, or until the top is golden brown and bubbly.
Serve warm with tortilla chips, sliced baguette, or fresh vegetables.