Bring a large pot of water to a boil. Salt the water generously and add pasta shells. Cook until al dente, using the smaller number of minutes on the package’s cooking directions. Drain. Rinse with cool water and drain again. Set aside.
Heat 3 tablespoons of olive oil in a large skillet over medium heat. Add pine nuts, and cook, stirring frequently until they turn golden in color. Remove from the oil with a slotted spoon to a small bowl.
Reduce heat to medium low and add green onions to remaining warm oil in skillet. Cook for about 4 minutes, stirring occasionally. Add garlic and cook 1 additional minute.
Add spinach to skillet, breaking up if it is clumped, and stir for about 1 minute. Add vinegar, salt, black pepper, chili flakes, and nutmeg. Cook for about 2 minutes to blend flavors. Remove from heat.
Add ham, bread crumbs, grated cheese, and pine nuts to spinach mixture. Stir to combine.
Fill each shell with spinach mixture.