I don't have any exhaustive tests to offer, but based on checking their inventory several times while on various characters with differing Magic Find amounts, they are completely unaffected by MF. The town vendors generally carry only magic (blue) items, and sometimes just to insult you they will stock a few whites as well.
Sometimes, you will encounter one of them in an event; such as
Tashun the Miner in the
Lost Mine (he is normally in Tristram near Brother Malachi). If you complete the Lost Mine event and check his offered inventory afterwards, you'll see a rare in it (unsure if it is always there or limited to only one yellow). There is also a similar merchant NPC
Larra in the
Deserted Cellar dungeon in Act 2 (the little girl who has hidden from the monsters on her mother's advice).
When you mentioned having seen rares on in-town merchants, did you by any chance complete Lost Mine and then visit the town in that session? Tashun is faster than he looks, he will get back to his old place faster than you can teleport there - I haven't tested this, but he may be offering the same goods to you that are on sale after the Lost Mine completion.