Many morphogenetic processes depend on the geometry of tissue-ECM or tissue-tissue boundaries, which often undergo dynamic shape changes themselves. We address this complex interaction in the context of polar ordering during epithelial development. Motivated by observations of an interplay between apico-basal polarity and boundary geometry in mouse embryo morphogenesis, we develop a theory for epithelial ordering based on the Landau-de Gennes approach to surface-induced alignment in liquid crystals. We define a dimensionless parameter that allows us to adjust the geometry of the system continuously, and use a weak anchoring energy to account for non-uniform boundary conditions. We calculate the corresponding alignment fields for different values of the parameters and boundary curvature, and identify two transitions where topological defects appear out of a uniform field, or change their structure in a non-trivial way. These defects represent regions where the apical sides of the cells meet; we therefore hypothesize that changes in defect position and structure are relevant to lumen formation in the biological system. We compare our predictions with imaging data of the morphogenetic process for control and manipulated mouse embryos, finding a remarkable quantitative agreement without any fitting parameters. Our work highlights the role of extra-embryonic tissue in embryogenesis, while identifying interesting physical phenomena such as boundary-dependent transitions in the structure of topological defects.