1Heat the oven to 350°F and arrange a rack in the middle. Lightly butter a 9-inch round, oven-safe serving dish and set aside.
2Bring a medium pot of water to the boil. Add the spinach in batches and cook until wilted, 2 to 3 minutes. Remove and refresh under cold running water. Squeeze to remove all excess water and chop. Set aside.
3In a medium pan, melt the butter over medium-high heat. Add the onions and cook, stirring, for 3 minutes. Add the garlic, salt, pepper, and cayenne, and cook, stirring, 1 minute. Add the flour and cook, stirring constantly, to make a light roux, about 2 minutes.
4Add the milk and cream in a steady stream, and cook, stirring constantly, until thick and creamy, 2 to 3 minutes.
5Add the cooked spinach and lemon juice and stir to incorporate. Add the brie and Jack cheeses, artichoke hearts, and bacon, and stir well. Remove from the heat and pour into the prepared dish. Top with the Parmesan and bake until bubbly, about 10 minutes. Serve immediately.