Preheat the oven to 375°F. Use a large 12-inch (or larger) oven-safe saucepan.
Heat 1/2 cup extra virgin olive oil in the pan over medium heat. Add 6 cloves garlic (minced or grated), 2 teaspoons dried oregano, 2 teaspoons dried basil, 1 teaspoon dried parsley, and 1 teaspoon crushed red pepper flakes. Cook, stirring often, until the garlic is golden and fragrant, about 4–5 minutes. Be careful not to burn the garlic.
Add the 24-ounce jar of marinara sauce to the pan and season with kosher salt and black pepper to taste. Increase the heat to high and bring the sauce to a boil.
Add 1 pound dry spaghetti to the boiling sauce, breaking the strands in half if needed to fit. Press the spaghetti into the sauce so it is mostly submerged and stir immediately to separate strands.
Maintain a brisk simmer or low boil and stir frequently, scraping the bottom of the pan, until the spaghetti is al dente and evenly coated in sauce, about 8–10 minutes.
Meanwhile, in a medium bowl whisk together 4 eggs, 1 cup whole milk ricotta cheese, and 1/2 cup grated Parmesan until smooth. Season the mixture with a little salt and pepper if desired.
Remove the pan from the heat and let it sit 30–60 seconds to cool slightly. Quickly stir the ricotta-egg mixture into the hot pasta until evenly combined.
Sprinkle 1 1/2 cups shredded mozzarella cheese evenly over the top of the pasta.
Using oven mitts, transfer the oven-safe pan to the preheated oven. Bake for 20–25 minutes, or until the cheese is melted, golden in spots, and bubbly.
Remove the pan from the oven and let the pie rest for about 5 minutes. Top with fresh basil and/or fresh oregano before serving.