Prepare pasta according to package directions. Five minutes before pasta is done, add carrots to pasta. Cook 3 minutes; add broccoli to pasta. Cook remaining 2 minutes. When pasta and vegetables are done, drain well. Lightly spray a 2-quart casserole dish with cooking spray; set aside.
Preheat oven to 375-o F. In a medium saucepan, melt margarine over low heat. Add onion and saute about 2 minutes. Stir in flour and continue cooking and stirring until mixture thickens. Add milk and cheese and cook until cheese is melted. Season with salt and pepper to taste. Mix pasta and vegetables with sauce. Transfer to casserole dish. Bake for 25 to 30 minutes or until heated through.