Preheat the oven (with one of its racks positioned in the center) to 350ºF.
Fill a medium pot halfway with water, and bring to a boil over high heat. Fill a large bowl with ice water and set it by the stove. Add the salt cod fillets to the boiling water, cook for 1 minute, then using tongs or a spider skimmer, transfer the fish to the ice water to chill. Transfer the cod from the water to a plate; remove and discard any remaining pinbones and pat the fish dry with paper towels. Lightly dust on both sides with flour and set aside.
To a large skillet over medium heat, add a ¼ cup of the olive oil. Line a large plate with paper towels and set it by the stove. When the oil is hot and shimmering, add the potatoes, season with salt and black pepper, and cook, stirring often, until lightly brown all over, about 12 minutes. Transfer the potatoes to a heatproof bowl and set aside.
To the same skillet, add the remaining ¼ cup olive oil. When it is hot and shimmering, add the cod and cook, turning once, until evenly golden brown, about 3 minutes per side. Transfer to the lined plate and set aside. To the same skillet, add the onions and cook, stirring frequently, until softened and beginning to brown, 10–12 minutes. Stir in the garlic, and cook until fragrant, about 2 minutes, then remove from the heat. Transfer about half of the onion-garlic mixture to a medium bowl, then spread what remains in the skillet in an even layer. Arrange the reserved potatoes evenly over the onion-garlic mixture, followed by the salt cod fillets. Top with the reserved onion-garlic mixture, then set aside.
In a medium bowl, whisk together the flour, milk, Port, eggs, and mustard; season lightly with salt and black pepper, then pour the sauce over the cod and potatoes. Transfer the skillet to the oven and bake until the potatoes are fork tender, about 30 minutes. Remove from the oven, garnish with black olives and parsley, and serve hot.