Combine corn, biscuit mix, egg, oil, and milk. Mix well and spread ½ of mixture in greased 8-by-8-by-2-inch pan. Cover with chilis and cheese (and ham, if using). Spread remaining batter mixture over top. Bake at 400 degrees for 30 minutes or until browned.