Should the term "witch hunt" only be used when dealing with a problem that does not exist, as in witchcraft, or does the term also apply when a problem does exist, but those dealing with it are ignoring due process?
The definition for witch-hunt, as given by the OED, is:
a. A single-minded and uncompromising campaign against a group of people with unacceptable views or behaviour, spec. communists; esp. one regarded as unfair or malicious persecution.
b. A campaign against an individual.
It has taken on this less literal meaning since the 1930s. The term is used to mean that a group of people is being persecuted for their beliefs unfairly. This can be used when there is a potential problem or not, but the group of "witches" is not being treated fairly. I think it is safe to say that the term applies to both of your cases: when there is no problem (like the Salem Witch Trials) and when due process is ignored (like communists in the US).