What are the products that failed, not because they weren't popular or solved problems, but because they had a poor architecture or codebase?I can think of a couple.
Friendster, as evgen points out. Probably MySpace. Zaplets, although it wasn't really their own code but rather Microsoft's. Quattro Pro for Windows. OpenOffice, although it's still struggling along. Netscape 5. Flash (you're wrong about the reason for the backlash --- the iPhone, iPad, and Kindle are just as proprietary.) Guile. mSQL. Arguably, F-83. WordStar 2000. Most likely, the entire pile of search engines trounced by Google in its first five years: Inktomi, AltaVista, Lycos, Excite, and so on. The GEM desktop, according to Steve Yegge. CERN httpd. Duke Nukem Forever. The GNU Hurd. INFORMIX-Online, probably, although again it's hard to tell from outside the company. Windows ME, in that it was the end of the Windows 95 codebase and was replaced by a better-architected codebase in the form of XP. Windows Vista, in that it shipped very late, missing most of the promised features, and was so sluggish that many people paid a premium to use XP instead. VisiCalc for MS-DOS. Anything written in BLISS-10, after the demise of the PDP-10. Almost anything written in 360 or 370 assembler when the mainframes got replaced. troff, which had to be rewritten as ditroff because nobody could maintain Ossanna's code after he died, although it's a peculiar sort of "failure" since it's still in use today. mod_svn (everybody uses svnserve now, right?) Zillions of Perl shopping cart scripts from the 1990s. Perl 6, probably.
There's an interesting distinction hiding here.
If you're putting together a web site where you're going to write articles about your local community and sell ads, you probably aren't going to be competing on the agility of your code. You're going to be competing on the quality of your writing (with a funny metric of "quality" where your optimum is cracked.com or eHow, not Faulkner or Hunter S. Thompson, but meh.) There's very little reason to take technology risks. You should install WordPress. If you do take technology risks, you're probably wanking but you're unlikely to make your product fail.
There are hundreds of thousands, maybe millions, of products like this. Hacker News and Metafilter compete on the quality of their communities, not their codebase. Enterprise software competes on the skills of its salespeople, not whether or not the code actually works, let alone whether it's better than the competition.
On the other hand, if your code quality is actually what you're competing on --- if your users will pick your site instead of the competition's because you have better spam control, or faster page loads, or more richly linked data about Little League games, or a more usable user interface, or richer graphics --- then you're going to have to take technology risks. If you just use off-the-shelf code, your product will be easily surpassed by the competition. You have to take risks by trying some new things, and if your risks don't pan out, your product will fail.