Heat olive oil in a medium pot over medium heat. Add garlic and cook, stirring until it’s softened and fragrant, about 30 seconds.
Add spinach to pot one handful at a time, letting each handful completely wilt before adding the next. Add crushed red pepper, if using, and season with salt and pepper. Continue to cook, stirring frequently, until most of the liquid from the spinach has evaporated (no need to drain), about 3 minutes. Add artichokes and season with salt and pepper. Cook for a few minutes, just to take the raw edge off the artichokes.
Reduce heat to low and add cream cheese and mozzarella/cheddar. Using a wooden spoon or spatula, stir until all the cheese has melted, about 3 minutes. Add mayo. Stir in sour cream and pecorino, and season with more salt and pepper. You can certainly eat this dip straight from the pot (or transferred to a serving bowl), but running it under the broiler for a crispy top is also an excellent option. To do so, transfer dip to a small ovenproof skillet (6 to 8 inches). Place in oven and broil until the top is golden and the dip is bubbling, 5 to 8 minutes. Let sit a minute or two before serving.