Fill a large pot halfway up with vegetable oil and heat to 365 degrees F. Set a large skillet over medium-high heat with the olive oil. Once hot add the onion and garlic and cook until softened, about 5 minutes.
Stir in the artichoke hearts and spinach and cook until the spinach has wilted, about 10 minutes. Remove from heat.
In a large bowl, stir together the cream cheese, sour cream, mayo, mozzarella, parmesan and warm vegetables. Stir together until the cheeses have melted and the mixture is somewhat smooth. Season with salt, pepper and red pepper flakes.
To shape the wontons, work with one wrapper at a time. Add about a teaspoon or two of the filling in the center. Brush the edges with egg wash and then seal into a triangle shape. Continue shaping until all the filling has been used.
Once the oil is hot, carefully add a few of the wontons at a time and fry until golden brown, about 3 to 5 minutes. Transfer to a paper towel lined plate and continue frying the rest.