Preheat oven to 425 degrees. Grease a 1-quart baking dish.
Add butter to a small skillet. Turn the heat on medium-high. Once butter has melted and begins to brown on the edges, swirl the pan. Continue to swirl the pan until the butter turns a deep brown color and smells nutty, about 2 minutes. Add onions and salt. Reduce the heat to a medium-low and cook onions and caramelized and brown, about 10 minutes. Stir frequently.
Once onions have caramelized add garlic. Cook 1 minute. Add red pepper flakes and sweet vermouth. Bring to a boil and reduce to a simmer until the liquid is reduced by half, about 1 minute.
Add cream cheese, sour cream, gruyere. mozzarella, mustard, pepper and artichoke hearts. Stir until combined. Transfer to a baking dish and bake until bubbly and golden brown, about 15 minutes.