Heat the butter in a saute pan and cook the onions over medium-low heat for 5 to 7 minutes, until tender. Add the garlic and cook for 1 more minute. Meanwhile, squeeze most of the water out of the spinach and place it in a bowl. Add the onion mixture, scallions, Gruyere, Parmesan, eggs, bread crumbs, salt, pepper, nutmeg, and pignolis. Mix well.