It only needs to be equal or greater. It doesn't need to be greater.
You also don't need to think about the fact that it could vary up to 290V if voltage tends to be high at your location, or the fact that 277V nominal is really 392V instantaneous. If a switch is rated for 277V, it is rated for use on any circuit that is 277V nominal, such that it can withstand the full ANSI standard tolerance that comes with that number.
It also is important that the applicable type of current (i.e. AC or DC) is acceptable within the product rating. Not usually an issue for AC, as most switches are built with AC in mind in the first place. But for DC, this can be very significant, because DC switches have additional safety issues to that govern the product design.