No, they did not feel any pain. We can see this from the perspective of several characters who experienced it and came back in the aftermath of Avengers: Endgame.
For instance, Yelena Belova was dusted and undusted in a matter of seconds (from her point of view), as we witness in Hawkeye season 1, episode 5. She did not seem to suffer any physical distress during or after the event.
Similarly, Monica Rambeau was snapped while she was asleep in her mother’s hospital room, and woke up five years later, as shown in WandaVision season 1, episode 4. She was confused and shocked, but not in pain. Many others were also restored during the event, and none of them seemed to be in pain, except for the one person that Monica ran into, but that was due to the collision.
We also see many people who were blipped back into existence in Spider-Man: Far From Home. They appeared to be fine, except for some minor inconveniences and collisions with other people or objects.