Grease a 9x13-inch baking dish with cooking spray.Combine 2 cups of the shredded cheddar with the 2 cans of diced green chiles. Spoon mixture evenly over the bottom of the prepared baking dish.Sprinkle the diced ham on top of the chile-cheese mixture.In a bowl, whisk together the eggs and milk and season with salt and pepper. Pour evenly over ingredients in the baking dish.Sprinkle the top with the remaining ½ cup of shredded cheddar and sprinkle with dried parsley for looks.Cover the dish with foil and bake at 375 degrees Fahrenheit for 60 minutes, removing the foil for the last 15 minutes to slightly brown the top. You can tell the casserole is finished when the center is bubbling/rises and is firm when pressed with your finger.