Cook pasta according to package directions; drain.
Meanwhile, in a large skillet over medium-high heat, cook beef and onion, stirring until beef crumbles and is no longer pink; drain.
In a large bowl, combine pasta, meat mixture, and sauce; toss to combine. Set aside.
Preheat oven to 400 degrees F. Coat a 9- x 13-inch baking dish with cooking spray.
In a small saucepan over medium heat, melt butter. Stir in flour; cook 1 minute. Gradually whisk in evaporated milk; cook 5 minutes, or until thickened.
Remove from heat; stir in Parmesan cheese, salt, and pepper.
Pour half the spaghetti mixture into baking dish; pour Parmesan cheese sauce over spaghetti. Sprinkle with 2 cup cheddar cheese. Top with remaining spaghetti mixture, and sprinkle with remaining 2 cup cheddar cheese.