Special equipment: A broiler-safe 2-quart baking dish
Position an oven rack in the center of the oven and preheat the broiler.
Bring a large pot of water to a boil and cook the macaroni according to the package instructions. Reserve 3/4 cup of the cooking water, then drain the macaroni and set aside.
Wipe out the pot. Add the butter and melt over medium heat. Add the shallots and cook, stirring occasionally, until soft, 2 to 4 minutes. Add the garlic and cook, stirring, until soft, about 2 minutes. Add the flour and cook, whisking constantly, until it begins to toast, about 2 minutes. (The flour will form a thick paste, but that's okay; just keep it moving in the pot.) Whisk in the milk and the reserved macaroni water and cook, whisking constantly, until the mixture is thick like gravy, 3 to 5 minutes. Whisk in the Swiss cheese, sour cream, 2/3 cup of the mozzarella and 1 tablespoon of the Parmesan. Once the cheeses have melted, add the spinach and cook until just wilted, about 1 minute. Stir in the artichoke hearts, macaroni, lemon zest, 1 teaspoon salt and 1/4 teaspoon pepper. Transfer to a broiler-safe 2-quart baking dish.
Stir together the remaining 1/3 cup mozzarella and 3 tablespoons Parmesan in a small bowl, then sprinkle over the macaroni. Broil until golden and bubbly, about 2 minutes.