Ensign doesn't just mean a flag, it means a symbol, an insignia (you can see how the words are related to each other and to "sign"). The ensigns of command are the symbols of authority -- "the seals of power and place" like crowns and sceptres. The episode "The Ensigns of Command" was about Data proving his authority, earning the colonists' respect, and the title referred to that symbolically.
I hope it features Sam Lavelle. The character has some potential.
Uhh... in an original series novel?