I am a UK citizen with an ESTA valid until August 2019, I'm flying into the US in June 2019, then driving into Canada for 2 weeks, and then back to the US for another week.
Will there be any problems about the time left on the ESTA?
No, you'll be fine. From the CBP website:
Do travelers need to update their travel authorization if it will expire before they depart from the United States?
No, An ESTA is only required to be valid on the day you enter the United States. The ESTA does not need to be valid for the entire time a traveler is in the U.S. If the ESTA expires while you are in the U.S., it will not affect your admissibility or the amount of time you are permitted to remain in the U.S.