Preheat the oven to 400°F (200°C). Grease a 3-quart or larger baking dish and set aside.
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 in a colander.
While the pasta cooks, heat 1 tablespoon olive oil in a large skillet over medium-high heat until shimmering; add the chopped onion and red bell pepper and cook until softened, about 5 minutes.
Add the chicken pieces and 1 teaspoon chili powder to the skillet, season with salt and pepper to taste (about 1 teaspoon salt and 1/2 teaspoon pepper if desired), and cook until the chicken is golden and cooked through, about 5–7 minutes. Transfer the chicken and vegetables to a bowl.
Return the skillet (or use a Dutch oven) to medium-high heat and melt 1/4 cup butter. Whisk in 1/4 cup flour and cook, whisking, until lightly browned, about 1 minute.
Slowly whisk in 2 cups milk and 1 cup chicken broth. Cook, whisking frequently, until the sauce thickens, about 3–5 minutes. Season with salt and pepper to taste.
Remove the sauce from heat and stir in 1 cup of the shredded cheddar until melted. Add the cooked spaghetti and the chicken–vegetable mixture and toss until well combined.
Transfer the mixture to the prepared baking dish, sprinkle the remaining 1 cup shredded cheddar evenly over the top, and bake until hot and bubbly, about 20–25 minutes. A piece of chicken should register 165°F (74°C).
Let the casserole rest for 5 minutes, then garnish with minced fresh parsley if desired and serve.