Formation of undermassive single white dwarfs and the influence of planets on late stellar evolution