Melt butter in a saucepan over medium-low heat; stir in onions and pinch of salt. Cook, stirring occasionally, until onions are soft, about 5 minutes. Stir garlic into onions and remove from heat.
Mix green onion mixture, spinach, artichoke hearts, cream cheese, Gruyere, Parmigiano-Reggiano, hot sauce, nutmeg, salt, and pepper in a large bowl until combined.
Spoon artichoke mixture into two ramekins. Top each with shredded mozzarella cheese.
Bake in the preheated oven until tops are golden brown and bubbling, about 25 minutes.