The phrase for writing a story, finishing it and then submitting it on hopes and prayers that someone might publish it is called On Spec.
This has always confused me, mostly because in my (paying) career the term On Spec means to deliver a quotation to build something to the specification. It's exactly the opposite -- you build exactly what you have been told to build, and you never do it without a contract signed in advance.
It took another author who likewise has a paying technology job to understand my confusion and clue me in on this one. jaylake explained that it's not specification, it's On Speculation...