Modeling the emergence of phenotypic heterogeneity in vascularized tumors