This narrative is pretty ubiquitous, so I'll give just two references: Russ Roberts in his paper "Gambling with Other People's Money: How Perverted Incentives Caused the Financial Crisis" (he podcasts on it here), or Barry Ritholtz's book Bailout Nation.
While anticipated financial bailouts do not increase lending prudence, I don't think they were very significant in the creation of the housing bubble. The 2008 crisis hit all banks, not just investment banks. Most non-investment bankers get much more modest salaries and bonuses, often largely in at-the-money options in their firm's stock, with 5 to 10 year horizons. So, looking at the accompanying chart, which shows the KBW Bank Index since 1994, we see that since 1998, bank stocks were pretty flat, with a slight 25% bump around 2006, but the index now is still below its 1997 level. When I left KeyCorp in 1999 I had a bunch of options priced around $25-30, and as I left I had to exercise them. Who knew that if I had stayed, those options would be worthless, as the stock now trades around $8, light-years away from being in-the-money. Most of my retirement savings would have been erased with the 2008 crisis had I remained there (and I'd be living in Cleveland--a twofer!).
This crash has been incredibly painful for your average bank decision maker. The Jimmy Caynes and Jamie Dimons may be rich, devious, and reckless, but it's naive to anthropomorphize banks via their titular leaders. As Bob Rubin, the erstwhile financial genius demonstrated when he said he knew nothing about Citibank's exposure to mortgages, these signature guys aren't too involved in the nuts and bolts of their ALCO meetings.
Your average bank decision-maker thought that lending to people with little income, to buy houses, was not that risky. Why this was so is interesting and complex, but I don't think it was as calculated as merely, 'well, I'll get rich lending the money, but won't lose much when it all goes downhill', because your average bank executive, at say Washington Mutual, Wachovia, or KeyCorp, just lost most of their retirement savings, and they won't be getting a do-over.
Update: Russ Roberts responds over at Cafe Hayek:
by 1998 [bank stocks] had nearly quadrupled, the time period when housing prices started to take off. Yes, it was flat for a while, but between 2003 and 2007, the heyday of subprime, [the KBW index] went from 70 to almost 120. I suspect those were some very good years for banking executives. Yes, they probably could not exercise their options immediately and some of them may have been stupid enough to hold on to them forever, but I would guess that they did just fine.
I'm sure the top executives over 10 years did just fine, as that select group tends to get out-sized compensation in all sorts of forms. But the decisions were made at all levels, especially the hundreds of mid-level executives who don't make millions, but it was they who really made the decision to originate and/or warehouse mortgages with 'innovative' underwriting standards (unlike Bob Rubin or Jimmy Cayne, who probably did not know, and never knew, what the distribution of loan-to-value ratios or other obligor metrics on mortgages were). If you assume these mid-level executives received 20-100% of their base salary in at-the-money options each year, they lost a lot of their wealth recently. They aren't poor, but if they thought this was a significant possibility back in 2005, they wouldn't have done it.