No.
If you earn money in PA, you are subject to PA tax and even have to file a non resident return. MA will give you a credit, or partial credit, for what you pay PA.
You do not have to file a local tax return, but you cannot get any local tax refunded