Infuse the Milk: If using herbs or dried mushrooms, heat the milk to just below boiling. Add the herbs or mushrooms, then remove from heat and let steep as it cools. Strain the milk and, if using rehydrated mushrooms, finely chop them and return them to the milk.
Combine Ingredients: In a bowl, whisk together the eggs, salt, and pepper. Gradually whisk in the milk (infused or plain).
Add Cheese and Flavorings: Stir in the grated cheese and any other desired flavorings.
Cook the Custard: Heat the mixture gently over medium-low heat, stirring constantly, until it thickens enough to coat the back of a spoon.
Chill the Custard: Remove from heat and strain the custard through a fine-mesh sieve to ensure smoothness. Chill the custard in the refrigerator for at least 4 hours, or preferably overnight.
Churn the Custard: Once completely chilled, pour the custard into an ice cream maker and churn according to the manufacturer's instructions.
Serve or Freeze: Serve immediately for a soft, melty texture. Alternatively, transfer to a freezer-safe container and freeze for 1-2 hours to firm up.