Pills are a result of the way the thread is spun and the length of the fibers in the thread. Some of the solutions, like spinning the thread more tightly or combing the fibers so that they all run in the same direction before spinning, result in less fluffy flannel; others, like using fibers with a longer staple, are impractical unless you want to use something other than cotton for your flannel.
So I’d say the answer is that the more pleasant the flannel sheets are when they are new, the more likely they are to pill. This is probably not what you wanted to hear.