Flatworms part of the clade platyhelminthes are one the more primitive groups of bilateral animals, probably the most primitive bilaterial animals were very similar to flatworms.
I had the idea about megafaunal sizes creatures with some of main and more notorious flatworms' features, with a ventral mouth and I remember some even have a double cephalization (with sensorial organs in both extremes of the body), some species with strange an interesting reproductive methods.
As I said, the flatworms are comparable to ancient precursos of both lineage arthropods and vertebrates, so looked reasonable to think that if flatworims would have the oportunity to evolve and fill new niches would converge with the "more advanced" arthropods or vertebrates, the problem is, these animals neither have defined organs or limbs. That makes harder to determine if the evolved flatworms would keep their interesting features while they become more complex or they finally would get features more conventional to vertebrates.
With convergent with vertebrate I meant to develop a spine and maybe skeleton or in general the required structures to grow till big sizes.
I know this is hard to think because the evolution require hundreds of million years, but the question is practically reduced to consider if those current adaptations could be keep after all that time considering the possible advantages and disadvantages of that.