Short answer: No. They're photosynthetic and derive most of their energy from that.
More complicated answer: Maybe eventually, if you don't feed the tank at all, or do WCs, they'll run out of vital nutrients.
If it's an almost-empty tank then your course of action is both clear and simple: fish out the shrimp and the snails, put 'em in a heated, aerated bucket, and use Flatworm Exit (or a comparable product) per the instructions on the bottle. Run carbon in your system afterwards for a day or two or do a massive WC (like, 50-75%) and you should be fine. You might not even need to fish out the shrimp and snails, but it's a good idea. At worst you lose the shrimp and snails, but I'd say that that's moderately unlikely. Your live rock and invertebrate populations (well, other than other flatworms you may have living in your system) should be unaffected.
Once you kill the flatworms, I heartily recommend getting one of the large number of small wrasses, attractive, reef-safe wrasses which prey on them. While they won't clear a tank, they'll eat any they can find and prevent them from becoming reestablished in the tank. (Since you don't have any other fish yet, I don't recommend a six-line. They can turn nasty, particularly to newcomers, once they have become established.)