Existence of solutions to a two-dimensional model for nonisothermal two-phase flows of incompressible fluids