ESH is a framework. It is actually derived from openHAB1, but moved under the Eclipse Foundation. It provides the core framework for a smarthome system, and is therefore core of OH2.
Most of the core functionality of OH2 is actually part of ESH (rules, sitemaps, items, REST interface…).
OH2 is then an implementation of ESH. It selects specific services, and customises the framework as OH2. It adds a LOT more bindings which can not be part of ESH due to ESH licensing constraints.