Looks like a detritus worm. Can't give you a scientific classification but I've had one in a planted tank years ago. I did some research when I found one and it seems they're a species of freshwater worm that lives on excess detritus in the aquarium. From what I've read they are perfectly fine and actually aid in the break down of detritus and only become a problem when there's a serious infestation. Apparently if there is an extreme amount of detritus in the tank you can see many of them with their end poking vertically out of the substrate. Eggs probably did come on a plant.