In a sci-fi RPG I eventually intend to run for a couple of friends, I had the idea of them visiting ancient ruins on a planet orbiting a shedding red giant.

Now, ignoring the problem of intelligent life evolving in a habitable zone with as short a lifespan as that around a red giant. What, if any, effects would the matter ejected as the star shedds its outer layers have on said planet?