Preheat oven to 350F and coat an 8-inch square baking pan with cooking spray.
Combine onion, garlic, chicken broth, cream of chicken soup, salt, and pepper in a large bowl.
Whisk until completely combined, then add chicken breast and asparagus spears.
Break uncooked spaghetti into 2-inch pieces and add to chicken mixture, mixing slowly to make sure all spaghetti pieces are covered so they absorb moisture.
Put mixture into prepared pan and sprinkle 1/2 cup cheese evenly over top.
Cover with foil, and bake for 35 minutes.
Uncover and bake for another 10 minutes until bubbly.