I think it depends on many things.
Being on the other side now (medical school grad), I am glad I did not attend a school that was more than the school I attended. Although it always gets paid back, seeing the fat number on your student loan statement hurts and I can only imagine how it feels having a debt amount double what I have. There is one dental school that charges over 100k per year IN TUITION ALONE. I would say that is absolutely NOT worth it and is ludacris that a school would even do that. Now, if you are talking about a school that's 35k vs 40k a year, then I would factor in other things like how close to family, the strength of the school, location, etc.
Overall, it depends on the person and what is important to YOU, but I don't think (IMO) you should go to schools that are excessively expensive.