I think it depends on the program you are applying to. In general, PDs like people who has a good sense of where they want to be after their training. It makes it less likely that they will "discover" that IM, or whichever other field you matched, is not what you wanted during residency. It also gives you something to talk about during interviews. However, keep in mind that different programs are looking for different people based on what their goals are. If you apply to a great, research driven program and tell them you want to be hospitalist, they will likely say "Great, but that's not who we train here." On the other hand, a fine community program might view your goal of being a generalist or hospitalist with much more interest. So, tailor your message for the programs that are most interesting to you, and make sure to apply to those that fit your needs best, not just based on perceived reputation, rank, or even location. Good luck!