Cubs, Marlins set to meet after bumpy paths to postseason