In an 8-qt. saucepan, heat the olive oil over medium-high. Season the lamb shanks with salt and pepper and, working in batches, add to the pot and cook, turning as needed, until golden brown, about 10 minutes. Transfer the shanks to a plate. Add the peppercorns, celery, garlic, rosemary, thyme, bay leaf, and onion to the pot and cook, stirring, until the vegetables begin to brown, about 10 minutes. Stir in the tomato paste and cook until lightly caramelized, 2 to 3 minutes. Pour in the red wine, bring to a boil, and cook until reduced by half, 4 to 5 minutes. Return the shanks to the pot along with 4 cups water and bring to a boil. Reduce the heat to maintain a gentle simmer and cook, covered, until the lamb is very tender, 2 1⁄2 to 3 hours.
Meanwhile, heat the broiler. Using a fork, pierce the eggplant all over, place on a foil-lined baking sheet, and broil, rotating as needed, until the skin blackens and the flesh is tender, 18 to 20 minutes. Peel off and discard the charred skin and discard the seeds. Purée the flesh until smooth.
In a small saucepan, melt the butter over medium-low heat. Add the flour and cook, whisking, for 2 minutes. Pour in the milk, bring to a boil while whisking, and cook, until the sauce thickens, 2 to 3 minutes. Remove the pan from the heat and stir in the eggplant purée and Gruyère until smooth. Season the sauce with salt, pepper, and nutmeg and scrape into a bowl.
Uncover the lamb, arrange the shanks on a serving platter, and keep warm. Bring the sauce to a boil and cook until reduced to 1 1⁄2 cups, about 30 minutes. Pour the sauce through a fine sieve into a bowl and discard the solids. Spoon the sauce over the shanks and serve with the eggplant sauce.