Preheat the oven to 375 degrees F (190 degrees C).
Mix 1/2 of the Cheddar cheese and 1/2 of the onions into the mashed potatoes. Spread potato mixture over the bottom and up the sides of a 2-quart casserole dish to form a shell.
Combine ham, frozen peas and carrots, mushroom soup, mustard, garlic, and pepper in a bowl; mix well. Spoon mixture into the mashed potato shell. Cover loosely with aluminum foil.
Bake in preheated oven for 45 minutes. Remove from oven and sprinkle remaining Cheddar cheese and onions over the top. Bake uncovered until cheese is melted, about 5 minutes. Remove and let rest for 5 to 10 minutes before serving.