Sub definetly does NOT need to match and I think if you look at most of the systems people run here, it is commonly the "odd speaker out". The rears SHOULD match the fronts if possible (and the carpet SHOULD match the drapes
) but assembling a good system with mismatched rears is also possible.
Personally I have found that size and sensitivty matched rears to fronts to be the easiest to blend. I am not suggesting you hang towers from your back wall but if you are running towers in the front with say, 8 inch woofers and a 6 1/2 inch mid, using a two way bookshelf with a 5 inch woofer for a rear channel will not sonically blend easily at all, even if the specs line up well from a matched component perspective.