Understanding polymer deformation during the nanoimprinting process is key to achieving robust polymer nanostructures. Information regarding this process can be extracted from monitoring the decay of the imprinted polymer patterns during thermal annealing. In the present work, the effect of both the molar mass and the imprinting temperature on the pattern decay behavior during thermal annealing is investigated. Previously, it was found that the decay rate is fastest for a highly entangled polymer due to the elastic recovery caused by the residual stress created during the imprinting process. The present paper demonstrates that this residual stress level can be modified through control of the imprinting temperature. These results are contrasted with those for an unentangled polymer over a similar range of imprinting temperatures, where it is found that the pattern decay is controlled by simple Newtonian flow. In particular, the pattern decay is well described by surface-tension-driven viscous flow, and no imprinting-temperature effect is observed during thermal annealing. It is shown that the stability of the film against pattern decay can be optimized for moderately entangled polymer films. This effect is attributed to the competition between the effect of increased viscosity with increasing molar mass and increased residual stresses with entanglements. These observations provide guidance for the optimization of imprinting process in terms of selection of molar mass and processing temperatures.