First, preheat your oven to 375°F (190°C) and trim the tops off the garlic heads and the bottoms of the shallots. Lay them on foil, drizzle with olive oil, sprinkle a bit of salt, and wrap the foil tight so they steam and roast together. This step transforms raw garlic into sweet, buttery cloves and softens the shallots beautifully.
Once cool enough to handle, squeeze the garlic and shallots out of their skins into a bowl. Mash into a paste and add the softened cream cheese and sour cream. Stir until fully combined, then fold in half of the mozzarella, all the Parmesan, chopped parsley, salt, pepper, and red pepper flakes for that classic savory flavor.
Spread this creamy mix into your pie plate and smooth the top. Sprinkle the remaining mozzarella evenly over it. Lower the oven to 350°F (175°C) and bake for 20–25 minutes until the cheese is melted, golden, and sizzling around the edges. Garnish with extra parsley and pepper flakes before serving warm.