Is withdrawing from two courses in my PhD bad for my future?
For postdoc and position in the industry, it will not cause any problem. 
However, faculty positions depend on grants, and commitees pick people who are able to obtain fund grants, and publish papers. It is unlikely they will care about your grades.