Preheat oven to 350 degrees F. Lightly grease a 9 by 13-inch glass baking dish with 2 teaspoons of the butter and set aside.
In a large skillet, melt the remaining butter over medium-high heat. Add the onions, 1/4 teaspoon salt, and 1/4 teaspoon freshly ground black pepper, and cook, stirring, until soft, about 3 minutes. Add the garlic and cook, stirring, for 30 seconds. Add the mushrooms and cook until they give up their liquid, about 5 minutes. Remove from the heat.
In a large bowl, combine the spinach, artichoke hearts, mushroom mixture, ricotta, jack, and feta, and toss to combine.
In a separate bowl, beat the eggs, nutmeg, remaining 1/4 teaspoon salt and 1/4 teaspoon pepper. Add to the spinach mixture. Add the bread crumbs and mix well. Transfer to the prepared dish and top with a layer of Parmesan. Bake until the casserole is firm and the top is golden, about 45 to 50 minutes.