Before you begin: You will need one 12-ounce jar of marinated artichoke hearts to yield the 1⅓cups called for here. You can substitute canned artichoke hearts if you can't find marinated. If you can find only 5-ounce packages of baby spinach, there's no need to buy a third package to make up the extra ounce; just make the dip with 10 ounces. Use the large holes of a box grater to shred the gouda and a rasp-style grater to grate the Parmesan. Serve with tortilla chips, crusty bread, pita chips, or vegetables.
Adjust oven rack to middle position and heat oven to 400º. Heat oil in 12-inch skillet over medium-high heat until shimmering. Add garlic and cook until fragrant, about 30 seconds. Add spinach, 1 handful at a time, allowing each to wilt slightly before adding next; cook until wilted and liquid has evaporated, about 4 minutes.
Off heat, add cream cheese and stir until melted and combined, about 1 minute. Stir in gouda, Parmesan, artichokes, mayonnaise, pepper, and cayenne until combined. Transfer to 2-quart baking dish and smooth top with rubber spatula
Bake until spotty golden brown and bubbling around edges, about 22 minutes. Let cool for 10 minutes. Serve.
To Make Ahead
At the end of step 2, let dip cool completely, wrap in plastic wrap, and refrigerate for up to 2 days. When ready to serve, continue with step 3, increasing baking time by 10 minutes.