Ah, they've finally posted the papers from the State of the Parties conference. Here's that article on Pelosi that I mentioned earlier by Larry Butler of Rowan University. And here's the money graph, showing the ideological journey that House speakers have taken prior to becoming speakers:
The numbers show the ideological distance from the party median, as measured by standard deviations of NOMINATE scores. Each observation is a term in office, culminating with the session right before they are elected speaker. Note how Wright and Foley moved toward the ideological extremes prior to becoming speaker, while Hastert, Gingrich, and O'Neill basically stayed where they were. Only Pelosi had to moderate to become speaker.
It's also kind of interesting that there seems to be an ideological sweet spot for becoming speaker, somewhere between .2 and .6 standard deviations more extreme than the party median.