One can speculate and find many ways that thinking too hard would increase cancer rates, although none of these speculations are strong enough to be actionable.
For example, thinking harder leads to greater metabolic activity in the brain, and greater metabolic activity can increase the risk of cancer. Therefore, thinking harder increases the risk of cancer.
Thinking hard can be associated with increased stress, and increased stress can cause the induction of endogenous viruses, which can themselves cause cancer or other serious problems.
I could go on, but the reality is, even while all of these are realistic statements, they contribute far less to overall risk than obesity or driving.
There also seems to be evidence that not thinking hard enough also causes issues however. Just as high metabolic activity in muscles can increase risk of cancer, very low metabolic activity also causes a wide range of problems.
Somewhat horrifying to think about... Oops.