Arrange rack in center of oven; preheat to 450°. Wrap shallot and garlic halves in foil. Arrange on a parchment-lined baking sheet.
Bake shallots and garlic until softened, 40 to 50 minutes. Let cool slightly. Reduce oven temperature to 350°.
In a medium bowl, combine anchovy, cream cheese, Parmigiano Reggiano, mayonnaise, mustard, lemon zest, pepper, and salt. Peel and finely chop shallots; fold into cream cheese mixture. Squeeze out garlic cloves and stir into cream cheese mixture. Pour into an 8" cast-iron skillet or baking dish. Sprinkle with mozzarella.
Bake dip until golden and bubbly around the edges, about 50 minutes.
Turn on broiler. Broil, watching closely, until top of dip is golden brown and bubbly, 1 to 2 minutes more. Let cool slightly.
Serve with romaine or crostini alongside.
