You are right about the rarity of amide to ester conversion. Amide to ester conversion has remained a challenging and underdeveloped synthetic transformation. It is often due to the fact that amides are sufficiently stable because of its resonance-stabilized $\ce{C–N}$ group that imparts a planar geometry to amides and as such, esterification is difficult and requires the use of harsh acidic or basic conditions, while employing a large excess of nucleophile (e.g. using alcohol nucleophile as solvent). In contrast, esters are generally reactive under a variety of mild condition and therefore the opposite conversion of ester to amides is quite normal.
The most promised method of achieving amide to ester conversions is Keck’s methylation/hydrolysis although this method is limited to the synthesis of methyl esters and thus researchers has developed some method to expand this conversion's feasibility and efficiency.
- Hie et. al. has achieved amide to ester synthesis using nickel complex catalyst. They studied the conversion of various aryl and heteraryl amides. One studied reaction is conversion of benzamide to methyl benzoate using $\pu{10 mol{\%}}$ $\ce{Ni(cod)2}$, $\pu{10 mol{\%}}$ SIPr, 2 equivalents of methanol, and toluene as solvent at $\pu{110 °C}$ for 12 hours. (Ref. 1)
An efficient two step transformation of 1° and 2° amides to methyl and ethyl esters has been developed using trimethyl- and triethyloxonium tetrafluoroborates, and dilute acid. This method was applied to 1-benzyl-4-phenylamino-4-piperidinecarboxamide, a precursor in the synthesis of carfentanil, to produce the methyl ester in $\pu{60{\%}}$ yield and the ethyl ester in $\pu{80{\%}}$ yield. (Ref. 2 and 3)
Conversion of amides to ester has been achieved using $\ce{CeO2}$ catalyst and HY zeolites. A variety of metal oxides as catalyst and ester yields has been discussed. (Ref. 4)
References
- Hie, L., Fine Nathel, N., Shah, T. et al. Conversion of amides to
esters by the nickel-catalysed activation of amide C–N bonds. Nature
524, 79–83 (2015). DOI: 10.1038/nature14615 (PDF link)
- Amide to ester conversion: a practical route to the carfentanil class of analgetics
Douglass F. Taber and Mohammad Rahimizadeh, The Journal of Organic Chemistry, 1992, 57 (14), 4037-4038, DOI: 10.1021/jo00040a061
- Anthony J. Kiessling & Cynthia K. McClure (1997) The Conversion of Amides to Esters with Meerwein'S Reagent. Application to the Synthesis of a Carfentanil Precursor., Synthetic Communications, 27:5, 923-937, DOI: 10.1080/00397919708004212
- Conversion of Amides to Esters via Selective Cleavage of Amide C–N Bonds over a CeO2 Catalyst by Shimizu et. al. (PDF)