Aldehydes undergo nucleophilic addition reactions while esters undergo nucleophilic acyl substitution reactions because a tetrahedral intermediate from the addition of nucleophile to a specific aldehyde do not have any leaving group while the intermediate from the addition of nucleophile to a specific ester would have a leaving group. For an aldehyde, methoxide is a much stable ion than that of an ester. Also, the -C=O group has more room for an additional reaction so you can form C-OH from the C=O while for an ester there is no more toom for any reaction if a strong nucleophile attacks the ester itself.