Preheat the oven to 350°F (175°C).
Cook the spaghetti in a large pot of salted boiling water according to package directions until al dente; drain and set aside.
Place the chicken breasts between sheets of plastic wrap and gently pound each to about 1/2-inch thickness using a meat mallet or heavy pan.
Combine the flour, salt, and pepper on a flat plate. Put the whisked egg in a shallow bowl and the breadcrumbs in another plate.
Dredge each chicken breast first in the seasoned flour, shaking off excess, then dip in the egg, and finally press into the breadcrumbs to coat evenly on both sides.
Heat the olive oil in a large skillet over medium heat. Add the breaded cutlets in a single layer (work in batches if needed) and cook about 4 minutes per side until golden and cooked through.
Spread half of the marinara sauce in the bottom of a baking pan and arrange the cooked spaghetti over it. Place the chicken cutlets on top of the pasta.
Pour the remaining marinara over the chicken and pasta, then sprinkle the shredded mozzarella and grated Parmesan evenly over the top.
Bake uncovered in the preheated oven for about 10 minutes, or until the cheeses are fully melted and bubbly. Serve warm.