In a bowl, whisk 1/2 cup milk, cornstarch, and egg until well blended.
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.
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.