To date I haven't, just passed 10 years with same employer. However, it is possible/likely that I will move to another country in the next year or so. At that point I have the obvious option to look for work in the same industry, though I'm also considering a sabbatical with some different part time work and/or switching to contracting rather than full-time employment. I'm in the fortunate position w.r.t. ease of changing employment of having no dependants and no debt.
If a bad job causes stress or health issues, or just takes up so much of your time that your family and free time are significantly affected then I would plan to change. I really think health and happiness of you and those close to you has to be more important than a particular job or career, in most normal situations (if you are serving in a war then there could be a higher purpose than your life, but let's assume that's not the case for the majority of people and jobs). For me if my current job were really unreasonable I could quit tomorrow. With mortgage/dependants etc. I wouldn't quit just like that, but it wouldn't stop me planning and making a change over a few weeks or months. Key would be a planned change though, build savings to cover expenses, ideally find new role first, have a back up plan of how to do some work to cover most of expenses if starting new role is delayed, determine which optional/luxury expenses can be reduced.