The designers admit the table's unclear
The first sentence in the spell prismatic wall's Effect of Color column occurs to effects from beyond the wall attempting to pass through the wall, while the second sentence in the Effect of Color column occurs to a creature itself when it attempts to pass through the wall. (The same applies to the spell prismatic sphere, too.)
Hence a creature with spells cast on it keeps those spells after penetrating the wall's sixth indigo layer much like, for example, the creature keeps its mundane ranged weapons after penetrating the first red layer and keeps its breath weapon after penetrating the wall's fourth green layer. The sixth, first, and fourth layers stop, respectively, spells, mundane ranged attacks, and breath weapons from beyond the wall from penetrating the wall; those layers don't also affect in those first sentences' ways a creature attempting to pass through the prismatic wall!
Pathfinder creative director James Jacobs in a 2010 Paizo messageboard post says
Objects, in this [prismatic wall] case, refers to nonmagical non-living things that are used to try to breach the wall. Like thrown rocks, thrown tables, arrows, catapult boulders, and so on. Any objects or items or whatever that are "attended" (as in, carried or worn by a creature) are NOT destroyed, but travel with the person carrying/holding them off to whatever other plane that person ends up going to. If the person makes their Will save to avoid being sent to another plane, he can stroll right on through the wall with all his stuff intact.
Allowing prismatic wall to automatically destroy every object that passes through it, in other words, IS a bit excessive. The intent of the spell is to prevent anyone from making ranged attacks with weapons or spells or abilities against those on he other side, basically, not to provide a static disintegration wall. The limitations of the table format forced us to be a bit more brief than we should have been in describing it, alas.
Artifacts can't be destroyed by a prismatic wall unless the Destruction line of the artifact says otherwise.
Thus the prismatic wall's layers have "their effects on creatures trying to attack you [with effects from beyond the prismatic wall] or [on creatures that] pass through the wall[, respectively]." However, this reader had to add all that bracketed information because, as Jacobs says, "The limitations of the table format forced us to be a bit more brief than we should have been in describing it, alas." (And that alas dates back to, like, at least the 2003 D&D 3.5e's description of the spell prismatic wall.)
For example, a typical creature that attempts to pass through the wall is dealt between 70 and 140 points of damage, and must make saving throws to avoid being poisoned, petrified, driven insane, and being sent to another plane, but the creature suffers none of the layers' other effects!
The creature, when passing through the wall, does not, for example, also see its mundane and magical ranged weapons destroyed by the red and orange layers, respectively, nor does the creature scratch its breath weapon off its character sheet because of the green layer, or see its spells dispelled by the indigo layer. Those layers simply stop those attack forms when launched from beyond the wall from reaching past the wall.
In other words, spells on the creature remain intact if the creature gets through the indigo layer of the prismatic wall, but spells from beyond the wall won't affect past the wall because the indigo layer stops all spells.