Preheat the oven to 375°F (190°C).
Heat the olive oil in a large 12-inch (or larger) oven-safe skillet or saucepan over medium heat.
Add the minced garlic, dried oregano, dried basil, dried parsley, and crushed red pepper flakes; cook, stirring often, until the garlic is golden and fragrant, about 5 minutes.
Carefully stir in the marinara sauce and 2 cups water, then season with kosher salt and pepper to taste.
Add the dry spaghetti to the pan, breaking the strands in half if needed to fit; increase heat to high and bring to a boil, stirring frequently so the pasta cooks evenly and doesn't clump.
Boil and stir the pasta until it is al dente, about 8–10 minutes (the sauce should thicken as the pasta absorbs liquid).
While the pasta cooks, whisk together the eggs, ricotta, and grated Parmesan in a medium bowl until smooth.
Remove the pan from the heat and immediately stir the ricotta-egg mixture into the hot pasta until well combined.
Sprinkle the shredded mozzarella evenly over the top.
Transfer the skillet to the preheated oven and bake until the cheese is melted and bubbly, about 20–25 minutes.
Remove from the oven, top with fresh basil and/or oregano, slice, and serve warm.