How harmful is it for a PhD student to work with a supervisor whose ambition is greater or lesser than that of the student? How harmful is it for a PhD student to work with a supervisor whose ambition is greater or lesser than that of the student? 

I can imagine that if the supervisor aims much higher than the PhD student the experience could be nightmarish for the student (and frustrating for the supervisor). Similarly if the supervisor aims too low (something like: "Just generalize this theory in way X, that should be enough for a PhD") the work could feel meaningless and the time spent on it wasted, when more challenging and maybe even more important questions could deserve the attention and resources.

Background: I am interested in a career in research. I am worried that if I aim too low in my PhD project it will hurt my career afterwards. PhD takes years and so one would ideally make most of the years spent doing it. Some supervisors are more ambitious and knowledgeable than others. I would imagine that a PhD with a more ambitious researcher (with talent and education to match) would improve one's chances of a career in academia than with a less ambitious one. I have read that the best thesis is a finished one, but surely one should think about how the PhD helps to further a post-PhD research career.

Could the difference be great enough to justify changing programs? Even if the funding is good?
It does not make much sense to me to compare the supervisor's ambition for herself to the student's ambition for himself: the supervisor is probably older (more often than not, significantly older) and certainly more experienced and accomplished than the student.  If a student feels competitive with his thesis advisor in any direct way, something has probably gone wrong.  Students should take on advisors that they view as distinctly wiser and more knowledgeable in the main topic they're trying to learn!  (The notion of a student who is comparably knowledgeable and skilled as his advisor is something which appears in the premise of a question on this site at least once a month.  Strangely, I have never seen it in real life.)  "Ambition" isn't exactly the right metric, because it aims at the future, and some very successful, eminent researchers are not pushing hard for the future: they've done plenty already.  Such "big old dogs" can make great thesis advisors.

On the other hand, some advisors are much more ambitious than others in their expectation for their students.  This is an important thing to take into account when choosing an advisor, and too great a mismatch in either direction is going to be a problem.  For instance, it is likely that at some point in the relationship the advisor will say "I want you to do X, and when you do it you'll have a PhD."  If the student thinks that there is no way in hell that he is going to get anywhere near X it is worth a conversation ASAP, and if X really needs to be attained to get a PhD (probably not, by the way, but just for argument's sake) then the student should look elsewhere.  On the other hand, if the student can (or does) do X in a month or two and the advisor says "Great -- now you have a PhD!" then the student may want to start over with someone who is more ambitious on his behalf.