The acid will react with the concrete and quickly neutralize. There should be no damage to the pex tubing. As far as the foam goes, the concrete adjacent to the foam will neutralize the acid. As a general rule the acid is still active if it is foaming while in contact with the concrete. Once the foaming stops it is neutralized.
If you've got a little scrap piece of the foam board, put some acid on it and see how it reacts. I think it may depend on how you put the acid down if it would be neutralized before hitting the foam board. If you spray it, some might hit the foam directly