An open quantum system theory for polarizable continuum models