Process for preparing esters from ethers or esters of lower homologous alcohols