If not using leftover pasta, cook spaghetti in salted water according to package directions. Drain and rinse under cold water, shaking it dry.
Whisk oil, eggs, garlic, salt, and Parmesan in a medium bowl until well combined. Toss in pasta to coat evenly -- clean hands work best for this.
Heat half of the butter (or bacon grease) in an 8 or 10-inch nonstick skillet over moderate heat. Add half of the pasta, spreading it evenly to the edges. Sprinkle half of the bacon over the pasta, leaving a 1/2-inch margin around the edge. Top with mozzarella, spreading it evenly over the bacon. Add remaining bacon over the cheese. Cover with remaining noodles and cook until golden on the bottom, about 5 minutes.
Slide the cake onto a plate and add remaining butter to the pan. Add a second plate on top of the plate with the noodle cake, flip it over, and then slide the cake back into the pan, cooking until the second side is crisp and golden, about 5 more minutes. Remove from pan and let sit for at least 10 minutes before slicing.
For the topping, chop tomatoes -- halves or quarters, if using cherry tomatoes, diced for larger tomatoes -- and toss them in a medium bowl with oil and vinegar. Stir in shallots and basil and season with salt and pepper to taste.
Cut noodle cake into wedges and serve. Top slices with fresh tomato topping or pass it around the table.