Preheat oven to 350 degrees F (175 degrees C).
Layer half the potatoes, half the ham, and half the onion in an 2-quart baking dish; repeat the layers.
Heat milk, peas, flour, butter, salt, black pepper, garlic powder, and onion powder in a saucepan over medium heat, stirring constantly, until thickened, 7 to 10 minutes.
Stir Cheddar cheese into sauce until cheese is melted.
Pour sauce over potato and ham mixture; sprinkle with paprika.
Cover baking dish with aluminum foil.
Bake in the preheated oven until potatoes are tender, about 1 hour.
Remove foil and continue baking until lightly browned, about 15 minutes more.
Source: Read Full Article