There were many flagships present at Pearl Harbor; half of the battleships of the pacific fleet were a flagship for one group or another. In 1941, Pennsylvania was indeed the flagship of the Pacific Fleet. California was Flagship for the US Navy's Battle Force, and West Virginia was Flagship for the battleships of Battle Force. After that, each battleship division had a flagship. So in early 1941 it looks like (this was not the exact organization during the attack):
UNITED STATES FLEET
(BB38) PENNSYLVANIA .................... Flagship
BATTLE FORCE, UNITED STATES FLEET
(BB44) CALIFORNIA .................... Flagship
BATTLESHIPS, BATTLE FORCE, UNITED STATES FLEET
(BB48) WEST VIRGINIA .................... Flagship
BATTLESHIP DIVISION ONE | | (BB39) | ARIZONA(F) | | (BB36) | NEVADA | | (BB38) | PENNSYLVANIA (FF) | | (VO-1) | Observation Squadron One, RED (Solid) (9 VOS). |
| BATTLESHIP DIVISION TWO | | (BB43) | TENNESSEE (F) | | (BB37) | OKLAHOMA | | (BB44) | CALIFORNIA (FF) | | (VO-2) | Observation Squadron Two WHITE (Solid) (9 VOS). | |
|
BATTLESHIP DIVISION THREE | | (BB42) | IDAHO (F) | | (BB41) | MISSISSIPPI | | (BB40) | NEW MEXICO | | (VO-S) | Observation Squadron Three, BLUE (Solid) (9 VOS). | | BATTLESHIP DIVISION FOUR | | (BB48) | WEST VIRGINIA (F) | | (BB45) | COLORADO | | (BB46) | MARYLAND | | (VO-4) | Observation Squadron Four BLACK (Solid) (9 VOS). | |