Heat oven to 350 degrees. Generously butter a 2-quart gratin dish. Coat with bread crumbs and shake out excess.
Place 6 whole garlic cloves in small saucepan and add water to cover. Heat to boiling, boil 1 minute, and drain. Heat about 1 inch fresh water in same pan to boiling. Add blanched garlic; reduce heat and simmer until garlic is tender, about 15 minutes. Transfer garlic to food processor or blender, add 1/4 cup half-and-half, and process until smooth. Transfer garlic cream to small bowl and reserve.
Heat large saucepan of water to boiling. Salt water, add collard greens, and cook 2 minutes. Drain and let cool. Squeeze greens to remove excess liquid and coarsely chop.
Heat oil in large skillet over medium heat. Mince remaining 2 cloves garlic. Add minxed garlic and shallots to skillet and cook until soft but not brown, 2-3 minutes longer.
Whisk eggs, garlic cream, and remainin 1-1/4 cups half-and-half together in mixing bowl. Stir in greens mixture, Gruyere, and ham. Season with nutmeg and salt and pepper to taste. Pour mixture into prepared dish and sprinkle with Parmesan.
Place dish in large baking pan and add enough boiling water to large pan to come halfway up sides of gratin dish. Bake until knife inserted in center comes out clean, about 25 minutes. Let cool 10 minutes before serving or let cool completely and serve at room temperature.