Preheat the oven to 375°F (190°C).
Clean the mushrooms and remove the stems.
In a skillet, heat olive oil over medium heat and sauté the minced garlic until fragrant, about 1 minute.
Add chopped spinach to the skillet and cook until wilted, about 2-3 minutes.
In a mixing bowl, combine sautéed garlic and spinach, artichoke hearts, cream cheese, Parmesan cheese, mozzarella cheese, salt, pepper, and red pepper flakes.
Spoon the filling into the mushroom caps, pressing down slightly to pack it in.
Arrange the stuffed mushrooms on a baking sheet and bake for 20-25 minutes.
Remove from the oven and let them cool slightly before serving.