For example, would I damage PEM fuel cell if I used hydrogen which was generated from alkaline water (high pH level) reaction with aluminum or acid water (low pH level) reaction with magnesium metal?
They suggest most degradation is comming from OH* radical (that is anyway creadted in the FC)
I'm not sure about influence of eventual external OH- ion.
On the other hand there will be much easier to keep NaOH in the solution than any acid. Acids generally evaporates. NaOH should not. Finally, I would make a connection long enough and use a filter to trap eventual particles (gases).
Acid or alkaline vapors or aerosols should be better avoided in H2 feeding a fuel cell. For instance, in H2 produced by your cited equation in alkaline media, impure H2 should be passed through an acidic scrubber of alkaline aerosol (eg. aqueous acetic acid) and the outcoming gas should be passed through a water flask to filter acid vapors.