First off, Canada and the US are not in Europe nor are they part of the European union, so you won't be able to get a passport for those countries you deliver your baby in Europe.

It will be difficult to travel after 8 months of pregnancy, even if you have a visa.  Many airlines don't want to have babies delivered in flight so they often prevent women who are 8 months pregnant or later from flying with them.

I'd suggest forget about going to Canada if you are close to delivery time.  Canada will be very careful about letting pregnant women who are close to delivery into the country precisely because too many people have used it as a way to get a citizenship for their children.