As Richard said, yes, they are retroactive.
When you make a new badge, that last thing it will do is ask you to check if anyone has already completed the criteria for the badge and will award it right then.
From then on, the system checks at each cron run to see if any active, enabled badges are to be awarded.
The exception is Manual badges, which are awarded immediately.