Actually the Cardassian ship attacked the Enterprise first, catching them when Worf switched realities and didn't recognize the controls. After they got in several hits with the shields down, they destroyed the array as the Enterprise was running away.
The Bajorans in that episode just attacked. No view screen images were shown, or anything. Maybe Finn's suggesting that the Cardassian warship in the reality were Worf goofed(before the mentioning of the Bajorans overpowering Cardassia) were Bajoran somehow. They never actually talked with them or even mentioned the ship was Cardassian, even if the script did when mentioning the viewscreen shots. Worf later mentions screwing up the battle with the Cardassians to Troi who doesn't correct him though.