Heat oven to 425 degrees. Butter a 9-inch springform pan and wrap the outside of the springform tightly in aluminum foil.
Bring a large pot of well-salted water to a boil. If using broccoli rabe, add it to the pot and boil for 1 to 2 minutes, then drain well.
Add spaghetti to boiling water and cook until 2 minutes shy of done. Drain well and let cool slightly.
If using broccoli rabe, wring all extra moisture out and mince into very small bits.
In a large bowl, whisk eggs and milk together with salt and pepper. Stir in all but ½ cup of each cheese and chopped rabe, if using. Add spaghetti and toss to coat.
Pour into prepared springform and sprinkle remaining cheese on top. Bake for 35 to 40 minutes (without greens) and up to 15 minutes more (with greens).
Turn on your oven’s broiler. Broil the pie for 2 to 3 minutes, until browned on top. Cut along springform ring to loosen, then remove ring. Slide onto a serving plate and cut into wedges.
