On a planar Liouville-type problem in the study of selfgravitating strings