1. In a bowl, whisk 1/2 cup milk, cornstarch, and egg until well blended.
2. In a 2- to 3-quart pan over medium-high heat, tilt and swirl sugar until melted and deep amber, about 4 minutes. Stir in remaining 1 1/2 cups milk; mixture will bubble and sugar will harden. Stir until sugar melts again, about 2 minutes.
3. Whisk about 1/2 cup of the caramelized sugar mixture into cornstarch mixture, then return all to pan. Stir over medium-high heat until pudding thickens and begins to bubble, 3 to 5 minutes. Remove from heat and stir in vanilla. Pour into bowls and serve warm. Or let cool, chill airtight up to 2 days, and serve cold.