Are their an legal restrictions in North America, Europe or Australia for outsourcing software development projects?
Not so much restrictions as implications.
You cannot export certain information (export controlled) or do business with certain countries (North Korea) if you are in the US.
You have to meet all local laws of all jurisdictions.
You may not be able to sell some items to some customers.
Things like that.
I am not a lawyer. You should check with one who specializes in this area if you are in a business that might have problems in this way.
In the US and Canada there are a few legal restrictions on exporting software, and these apply to specific embargoed countries (e.g. North Korea, Iran) or sensitive technologies (military, encryption, surveillance). You should check with the local jurisdictions of the country your contractor resides in. In most cases these are easily avoided.
Additionally, if your project involves the export or import of personalized data, there may be privacy regulations that come into play. HIPAA and GDPR are particular examples that come to mind.
If your software involves privacy or national security, I wouldn't outsource any development overseas. That's just my modus operandi.
I know plenty of Ukrainian software companies outsourced by companies in Silicon Valley. Being more specific would help to get a more specific answer. Also, for legal restrictions it is best to retain a legal consultant.)
Rarely are there legal restrictions, except where the software serves a specific regulated purpose, is used by government, or involves a blacklisted country. Companies also may consider the likelihood of their ability to enforce any contract across borders, in what currency they pay for work, and whether the software is likely to be pirated in the country where development occurs. Access to proprietary information across borders is a concern. And familiarity with differences in privacy regulations is another important aspect of development occurring across borders.
As always, you should consult an actual attorney for legal opinions. My notes are areas to investigate, not instructions on what's safe and not.