Cook the spaghetti according to the package directions; drain and return it to the pot.
In a small saucepan, warm 3 tablespoons of the olive oil with the garlic and red chili pepper, until the garlic begins to sizzle, 2 to 3 minutes. Add to the pasta in the pot, along with the herbs, and toss to combine.
Meanwhile, heat the remaining tablespoon of oil in a large nonstick skillet over medium heat. Add the eggs and cook until the whites are set, 2 to 3 minutes. Serve the eggs on the spaghetti. Top with the Parmesan.