Preheat your oven to 375°F (190°C). Pound the chicken breasts to an even thickness of about 1/2 inch.
Set up a breading station: mix flour with salt and pepper in one bowl, whisk the egg in another, and place breadcrumbs in a third bowl. Dredge each chicken breast in flour, dip in egg, and coat with breadcrumbs.
Heat olive oil in a skillet over medium heat. Cook the breaded chicken for about 4-5 minutes on each side until golden brown. Transfer to a baking dish.
Pour marinara sauce over the chicken, then sprinkle mozzarella and Parmesan cheese on top.
Bake for 20-25 minutes until the cheese is bubbly and slightly golden.
While the chicken bakes, cook spaghetti according to package instructions until al dente. Drain and set aside.
Serve the chicken hot over the spaghetti and spoon extra marinara from the baking dish on top. Garnish with fresh basil if desired.