Found on a beach in Brisbane, Australia. Only a few cms of it was visible but I dug the rest of it out, it was about 20cm in length.
That is a Priapulid worm, also known as a "penis worm". In its own phylum, Priapulida. https://en.wikipedia.org/wiki/Priapulida