Naming ester as a substituent to carboxylic acid
As you have correctly stated in the question, the $\ce{-COOH}$ group has higher priority than the $\ce{-COOR}$ group. In fact, the $\ce{-COOH}$ group has the highest priority (excepting cations) in IUPAC nomenclature.
The $\ce{-COOH}$ group should be included as the suffix of the parent chain, while the $\ce{-COOR}$ is indicated using a prefix.
In fact, Section P-65.6.3.2.2 of the Nomenclature of Organic Chemistry: IUPAC Recommendations and Preferred Names, 2013 (aka the Blue Book) specifies the rules for this.

When, in an ester with the general structure R-CO-O-R' or R-S(O)XO-R', another group is present that has priority for citation as the principal group or when all ester groups cannot be described by the methods prescribed for naming esters, an ester group is indicated by prefixes as 'acyloxy' for the group R-CO-O—, and 'alkyloxy(alkany1)...oxo' or 'alkyl(allcanyl)oxycarbonyl' for the group —CO-OR'.

I quote the example provided in the text:



And another one (not from the Blue Book though)

3-Ethoxy-3-oxopropanoic acid



References: Favre, H. A., Powell, W. H. Nomenclature of Organic Chemistry: IUPAC Recommendations and Preferred Names 2013 R. Soc. Chem 2013 DOI: 10.1039/9781849733069