She was left in charge of the people of Rohan and she deserted them. She was in a position of authority and trust which she betrayed to follow her heart. Was this right? Indeed not. The book never mentions if she left a captain or warden in her stead. Simply put she abandoned her people to seek death and glory on the battlefield.
Her actions were indeed valourous on the field but had she not been successful would she have been seen in a different light? Was Tolkien, coming from a military background, aware that his most active female character was doing something heinous in a warlike culture?
Well, you are right she left her duty. But i can’t see why that should be of any importance. If she hadn’t been at Pelennor Fields, then perhaps there wouldn’t been a victory for Gandalf & Co, or perhaps the victory would’ve been flawed by the survival of the Witch-King or the death of Faramir, if Gandalf chose to help Théoden (which he didn’t, he chose to save Faramir).
Not to mention, all the necessary measures of safety were already taken : anyone who didn’t go to Mundburg was evacuated to Helm’s Deep or Dunharrow. There was nothing left to do, but wait for either Théoden to return, or the armies of Mordor to come.
But i think she would’ve ultimately stayed and done her duty, if Aragorn wouldn’t have come to visit her and tell her that he’d take the Paths of the Dead, and hence shatter all her illusions and make her so desperate that she went against her uncle’s orders and sought death. She thought they were all going to die, and instead of dying like a badger being burnt in his burrow, she wanted to die a glorious death.
And JRRT didn't really have a military background at all. He shortly fought at the Somme in 1916, but was soon sent home because of trench fever.
It could have been a different story if she had run off to collect pebbles and flowers...
Well, that she did as well, by marrying a man of Gondor and go living with him in Ithilien...
For starters, how did she manage to go undetected amongst the Rohirrim and make it all the way to the battle? You would think a frantic message from Edoras about a missing Lady Eowyn would have reached Eomer during this time. Still, she was destined to be there.
It is all very easy really : “Dernhelm” had an easy time, as some generals of Rohan, like Elfhelm, knew that Éowyn was coming with them :
from The ride of the Rohirrim:
There seemed to be some understanding between Dernhelm and Elfhelm, the Marshal who commanded the éored in which they were riding. He and all his men ignored Merry and pretended not to hear if he spoke. He might have been just another bag that Dernhelm was carrying. Dernhelm was no comfort: he never spoke to anyone.
So anyway, it's clear that no one in Rohan would cry out against her act of defiance. They all had warriorblood, both the men and the women, and would only regard her as a hero.
And Éomer was so happy after she was saved by Aragorn, that he could never blame his sister for anything - cetainly not after both Aragorn and Gandalf explained to him what drove Éowyn to do what she did.