Does the carrier matter when flashing custom roms?
Yes and no. Most times probably not, but there are some carriers which not only apply software modifications but also obtain specific hardware configurations from manufacturers (AFAIK Verizon is one of those having done that in the past for some devices at least, and T-Mobile was mentioned in that context as well).

Which means, there's no "generic answer" to this question, but you must check for each device separately. If the hardware matches, the carrier should be irrelevant concerning the custom ROM – as the latter then again matches the hardware.