Can a 27 inch stackable washer and dryer be safely installed in a slightly over 27 inch opening?
The problem you should be aware of is most walls aren't precisely square (Nor plumb). So if your tape measure reads 27 inches at the niche opening it may read 26 1/2 inches at the back of the opening (or 28 inches!). You should take measurements from different points of where the appliance will go. (3) minimum: front, middle and back.
If you find the appliance is slightly big for the space planned on modifications can be made to allow some extra space. As you suggested dry wall can be removed if you need 1/2 inch or less in width. Just realize you'll have an open wall with studs exposed. Unless, of course you only need less than 1/4 inch. Than you can remove the 1/2 inch drywall and replace it with 1/4 inch drywall or paneling.
Getting more than 5/8 inches would mean chiseling down the studs.
Remeasure to verify the width at several points. If they all read 27 inches you'll have a snug fit and possibly some vibration coming through the walls when the spin cycle goes on.