To the writers please.
If I understand the process of a Trek novel, or indeed any other novel, it's a process of pitching ideas and working out outlines before you get a go ahead from the editors/publishers to write the novel.
Not exactly. That's usually the way it works with Trek and other tie-in fiction (though often it's not so much a case of the author pitching as the editor specifically requesting a proposal from the author). But with original fiction, it's not so necessary to get outline approval in advance. When the universe is entirely your own creation and property, you don't need anyone else to approve your ideas of what can happen in it. And if you're a new writer trying to get an agent or editor for an original, non-tie-in project, you have to write the whole novel first (on spec) and then try to sell it.
But have you ever had a pitch shot down, an idea that you were so enamoured with, that you went and wrote the novel anyway, just for yourself (or are in the process of writing whenever you can find the spare time)? Are there masterpieces lying in boxes or loose leaf binders that will never see the light of day?
Not in the way you're suggesting -- and certainly not where Trek fiction is concerned, since there's no point in writing a novel you already know you can never sell. If you don't sell an idea in one context, rather than going ahead and writing it in that form, you save the basic
idea and try to rework it for another context, another market, another universe. Writers save and reuse old ideas all the time. For instance, my new
Titan novel is partly based on an unsold spec novel I wrote many years ago.
Some authors have reworked failed Trek pitches into other forms, both Trek and otherwise. As Dave Mack mentioned just yesterday, elements of his SCE novella
Wildfire were adapted from his and John Ordover's original pitch for DS9's "Starship Down." Howie Weinstein's
Mere Anarchy installment is based on an idea he'd originally pitched as a Trek novel and then a Trek comic. David Gerrold turned a rejected TOS outline into
several different works -- the original novel
Yesterday's Children, its revamp
Voyage of the Star Wolf (which has two sequels, one of which is based on his rejected TNG script "Blood and Fire"), and the Bantam TOS novel
The Galactic Whirlpool. I know there was a "name" SF author who turned one or two failed TOS pitches into original fiction, though I forget who it was, possibly Philip Jose Farmer.