Warm olive oil in a 10-inch cast iron skillet over medium heat. Add the onion and cook, stirring often, until it becomes translucent, about 2-3 minutes.
Add the garlic and cook until fragrant, about 1 minute.
Pour in the wine, scraping up any browned bits from the bottom of the skillet.
Add the spinach, artichokes, and red pepper flakes, cooking until the spinach is wilted and the excess liquid has evaporated, about 4 minutes.
Mix in the cream cheese and sour cream, stirring until melted and well combined, about 5 minutes. Remove from heat.
Stir in the Parmesan and season with salt and pepper to taste. Sprinkle the top with mozzarella.
Preheat the oven to broil on high, positioning an oven rack 6 inches from the broiler.
Place the skillet in the oven and broil until the top is golden brown and bubbly, about 3-5 minutes.