A deformation-based framework for learning solution mappings of PDEs defined on varying domains