What is the maximal shelf life of UHT milk?
I'd never heard of ESL until your question, so I had to look that up.  A local company did a lot of work developing UHT milk; I remember samples when they were first starting up production, and they were trying to find flavors additives which would mask the flavor change from the UHT processing.   Since then a lot of companies have adopted the processing methods for other products, or just adopted the packaging.  So, before I relied on any random box-packed product to be shelf stable, I'd check into how it was produced.

Proper UHT milk doesn't go bad until it's opened.  It's sterile, and in a pretty sturdy container.  Once opened, bacteria will get back into the container, and the milk will go bad as normal.  When the local company started production of UHT milk, they were putting 2 year code dates on packages, and that was just the longest date the government would allow; I've had boxes 3-4 years old, which were fine.