Bad writing aside;
Not all elves are all powerful. This is a bit of an LotR issue (books and movies) because the main Elf we are exposed to is Legolas and he is exceptional.
In Tolkien lore, Galadriel is many levels above Legolas, but it doesn't mean the elves she is with would be as well. They gave no indication that the troop she was with were anything more than just regular elves.
As you said though its more of a writing issue, it's fair that Galadriel could solo a troll, it took most of the fellowship to down their troll, but these elves aren't at the same ability level as Legolas, Gimli, Aragon, and Boromir. It's more a problem of portraying Galadriel better vs just making everyone else look stupid. At least they survived getting absolutely pummeled.