The first flag of Portugal was the coat of arms of Henry of Burgundy, Count of Portugal and father of Afonso I (1109-1185), the first king of Portugal.
It's an azure cross over a silver field. Crosses were popular motifs of the first coats of arms (perhaps because they were used in the First Crusade in 1099). According to the early heraldic rules of the 12th century, the only traditional options for a tincture (color) over a metal (silver) were red, black, blue, green and purple.
So, while the Finnish flag might have a meaning (blue for lakes, white for snow), the similarities are just a coincidence because there wasn't much room for innovation for Afonso I.