Preheat an oven to 450 degrees F (230 degrees C). Prick potatoes several times with a fork and place onto a baking sheet.
Bake in the preheated oven until potatoes are soft, 50 minutes to 1 hour. Remove potatoes from oven and let cool until safe to handle, at least 15 minutes.
Reduce oven temperature to 350 degrees F (175 degrees C). Spray a casserole dish or 9x13-inch pan with cooking spray.
Heat a large skillet over medium-high heat. Cook and stir sausage in the hot skillet until browned and crumbly, 5 to 7 minutes. Transfer sausage to a bowl. Saute onion in the same skillet until translucent, about 5 minutes. Transfer onion to the bowl with the cooked sausage.
Mix eggs, half the Cheddar cheese, milk, salt, and pepper into the bowl with the sausage mixture.
Grate potatoes and add to the bowl of sausage mixture. Pour mixture into the prepared dish; place remaining Cheddar cheese on top.
Bake in the preheated oven until casserole is heated through and cheese is melted and bubbly, about 35 minutes.