Preheat oven to 375°.
Combine milk, sugar, dried thyme, and pepper in a medium saucepan over medium-high heat. When mixture begins to simmer, gradually add cornmeal in a slow, steady stream, stirring well with a whisk. Cook 3 minutes or until thickened and smooth, stirring constantly. Transfer cornmeal mixture to a large bowl. Add yolks, stirring with a whisk. Let mixture stand 10 minutes.
Heat a large nonstick skillet over medium-high heat. Coat pan with cooking spray. Add onion; sauté 6 minutes or until tender. Add to cornmeal mixture. Recoat pan with cooking spray. Add ham; sauté 5 minutes or until ham begins to brown. Add to cornmeal mixture. Stir cheeses into cornmeal mixture.
Beat egg whites with a mixer at high speed until stiff peaks form (do not overbeat). Gently stir one-third of egg white mixture into cornmeal mixture; gently fold in remaining egg white mixture. Using a rubber spatula, scrape cornmeal mixture into a 1 1/2-quart soufflé or deep baking dish coated with cooking spray. Bake at 375° for 50 minutes or until puffed, golden brown, and just set in center. Serve immediately.