In a greased 8-in. square baking dish, layer the hash browns, ham, chilies and cheeses. In a large bowl, whisk the eggs, milk and pepper; pour over the casserole. Cover and refrigerate overnight.
Remove from the refrigerator 30 minutes before baking. Bake, uncovered, at 350 degrees F. for 1 hour or until a knife inserted near the center comes out clean. Let stand for 5-10 minutes. Serve with salsa if desired.