Preheat the oven to 400°F (200°C). Bring a large pot of salted water to a boil.
Add the spaghetti to the boiling water and cook until al dente, about 9 to 10 minutes; drain well.
While the pasta cooks, heat the olive oil in a large skillet over medium-high heat until shimmering.
Add the chopped onion and red bell pepper to the skillet and cook until softened, about 5 minutes.
Add the chicken pieces and chili powder, season with salt and pepper to taste (suggested: 1 teaspoon salt and 1/2 teaspoon pepper), and cook until the chicken is golden and cooked through, about 5 to 7 minutes; transfer the mixture to a bowl.
In the same pan or a Dutch oven over medium-high heat, melt the butter. Whisk in the flour and cook, whisking, until lightly browned, about 1 minute.
Gradually whisk in the milk and chicken broth and cook, whisking constantly, until the sauce thickens, about 3 to 5 minutes.
Taste and adjust seasoning with salt and pepper (suggested: 1 teaspoon salt and 1/2 teaspoon pepper). Stir in 1 cup of the shredded cheddar until melted.
Add the drained spaghetti and the cooked chicken and vegetables to the sauce and toss until everything is evenly combined.
Transfer the mixture to a 3-quart or larger baking dish, sprinkle the remaining 1 cup of cheddar over the top, and bake until hot and bubbly, about 20 to 25 minutes; a piece of chicken should register 165°F (74°C).
Let the casserole rest 5 minutes before serving and garnish with minced fresh parsley if desired.