For the cake: Preheat the oven to 425 degrees F. Generously spray the inside of a 12-cup bundt pan with nonstick cooking spray.
Bring a pot of heavily salted water to a boil. Add the spaghetti and cook until not quite al dente according to the package instructions.
Meanwhile, combine the eggs with the Parmesan and Pecorino in a large bowl. Whisk in 1 teaspoon salt and 1 tablespoon pepper.
Drain the pasta and discard the cooking liquid. Pour the pasta into the egg mixture and toss thoroughly to combine. Once the pasta is evenly coated, pour it into the prepared bundt pan. Gently press the pasta into an even layer.
Bake until the pasta cake is firm and some strands of pasta have turned golden brown, about 20 minutes. Let cool in the pan for 10 minutes, then invert the cake onto a large serving platter.
For the toppings: Melt the butter in a large saucepan over medium heat. Whisk in the flour until a smooth paste forms. Cook the roux, stirring frequently, until it begins to smell like toasted nuts, 1 to 2 minutes. Pour in the milk, continuously whisking. Reduce the heat and simmer until a thick sauce forms, about 3 minutes. Whisk in the Cheddar and grated Parmesan and stir until melted, loosening with 1 to 2 tablespoons of milk if needed. Sprinkle with salt to taste. Allow to cool slightly before topping the cake.
Decorate the cake with the cheese sauce. Allow the cheese "icing" to drip down the sides of the cake slightly. Top with the Parmesan shreds and basil to resemble sprinkles. Slice the cake into wedges and serve warm, with extra sauce on the side if desired.
If you'd like to serve the cake with tomato sauce instead of cheese sauce, decorate with one 24-ounce jar marinara sauce, warmed.
Copyright 2019 Television Food Network, G.P. All rights reserved.