Preheat oven to 400 degrees F.
Cook pasta according to package. Drain and rinse with cold water.
Combine pasta, ham, and peas in a large bowl.
Coat a medium saucepan with cooking spray and heat over medium heat. Add onion to saucepan and cook for 3-4 minutes, stirring. frequently.
Add milk and bring to a simmer.
Remove saucepan from heat and gradually add in cheese a little at a time. Make sure each batch of cheese is melted before adding more. Stir in salt and pepper.
Pour cheese mixture over pasta and stir to coat all of the pasta.
Put pasta mixture in a 13x9 baking dish sprayed with cooking spray.
In a small bowl combine panko crumbs and melted butter. Spread crumbs over the top of pasta.
Bake for 20 minutes or until panko crumbs are slightly browned.