Preheat the oven to 400°F (200°C).
Bring a large pot of water to a boil with 1 tablespoon salt; add the spaghetti and cook until al dente, about 9–10 minutes, then 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 1 teaspoon chili powder; season with salt and pepper to taste and cook until the chicken is golden and cooked through, about 5–7 minutes. Transfer the chicken and vegetables to a bowl.
In the same Dutch oven or skillet over medium-high heat, melt the butter. Whisk in the flour and cook until lightly browned, about 1 minute.
Gradually whisk in the milk and chicken broth and cook, whisking, until the sauce thickens, about 3–5 minutes. Season the sauce with salt and pepper to taste.
Stir 1 cup of the shredded cheddar into the sauce until melted, then add the cooked spaghetti and the chicken-vegetable mixture and toss until everything is well combined.
Transfer the mixture to a 3-quart or larger baking dish, sprinkle the remaining 1 cup cheese over the top, and bake until hot and bubbly and any chicken reaches 165°F, about 20–25 minutes.
Let the casserole rest 5 minutes before serving and garnish with minced fresh parsley if desired.