Many-body theory of electrical, thermal and optical response of molecular heterojunctions