Preheat oven to 400 degrees.
Melt the butter in a large oven-proof skillet over medium heat. Cook onion until softened, about 3 minutes. Add the garlic and cook until fragrant, about 30 seconds. Add the flour, stir to combine and cook for 3-5 minutes or until flour starts to turn a light golden brown. Slowly add the half-and-half and then the cream cheese chunks. Cook and stir until the sauce is slightly thickened.
Remove from the heat and add the artichokes, 1 cup of the Parmesan, about 3/4ths of the mozzarella, lemon juice, hot sauce, cayenne, spinach and salt. Stir until well combined.
Smooth the dip into an even layer in the skillet or scoop into a lightly greased casserole pan. Bake until golden brown and bubbling, about 20 minutes.
Sprinkle with the remaining Parmesan, shredded mozzarella and the red pepper flakes. Return to the oven and bake an additional 10 minutes or until golden brown and bubbling. Cool for 10 minutes then serve with chips or bread.