Cook the Spaghetti: In a large pot, bring generously salted water to a rolling boil. Add the spaghetti and cook until it is just slightly underdone—about two minutes less than what the package instructions recommend. This ensures the pasta won’t overcook in the oven. Drain thoroughly and set aside.
Preheat the Oven: While the spaghetti is cooking, set your oven to 425°F to preheat.
Prepare the Pancetta and Sage: Heat a 10-inch oven-safe skillet over medium-high heat. Add the diced pancetta and cook until it becomes crisp and golden, about 7–10 minutes. Stir in the minced sage and cook for an additional minute to release its aroma. Remove the skillet from heat.
Combine All Ingredients: Into the skillet with the pancetta and sage, add the drained spaghetti, whole milk, 1½ cups of Gruyère, 1½ cups of pecorino, the Parmigiano-Reggiano, cherry tomatoes, eggs, 2 teaspoons of salt, and freshly ground black pepper. Toss everything together until well mixed and evenly coated.
Top and Bake: Spread the mixture out evenly in the skillet. Sprinkle the remaining Gruyère and pecorino cheeses over the top. Place the skillet in the oven and bake for about 40 minutes, or until the dish is bubbling and the top has turned a golden-brown color.
Cool and Serve: Let the torte rest for a few minutes after removing it from the oven to allow it to firm up slightly. Garnish with freshly chopped chives before slicing and serving.