As I said, writers have virtually no power in the feature film industry, so they can't be held responsible for the failure of a movie. They're treated as mere contractors hired to do what the director and producers tell them to do, and they can't control how their scripts might get rewritten or mangled by uncredited script doctors, the director, the editor, and the studio execs.
Besides, professionals understand that nobody bats a thousand. There are countless factors affecting whether a film succeeds or fails, and the majority of them fail, so if you blacklisted everyone who ever worked on a failed film, there'd be nobody left to make new films. Not only that, but only about 1 or 2 percent of scripts sold to or commissioned by movie studios even get made. For every film the public sees, there are fifty or a hundred scripts that never even got that far. From that standpoint, getting a film completed and released at all is a success, even if it bombs.
So a lot of what gets people hired is less about the final box office than it is about the process itself -- whether they deliver what's asked of them in a reliable fashion, whether they stay on schedule and under budget, whether they're good to work with on a personal level, that sort of thing. Since a writer's role in the feature industry is to follow the director's wishes, a writer who's reliable at following instructions and translating the director's ideas into filmable scripts is likely to keep getting work, even if they keep getting hired by directors whose ideas are crap.