A generalized porous medium equation related to some singular quasilinear problems