Upvote:3
No one will ask you for a passport when leaving the USA, as there are no immigration exit formalities at US airports*.
Your arrival is and departure is recorded electronically.
The airline on which you will travel will want to know if you are eligible to enter Australia. At the check in counter you can show your Polish passport with the visa. This will allow you to get your boarding pass.
Throughout the journey you will use your Canadian passport; except when you land in Australia where you will show your Polish passport with the visa in order to clear immigration.
On your way back, you will show your Canadian passport at the checkin counter in Australia, and then show your Polish passport at the Australian immigration counter.
Once you clear immigration, you will only need your Canadian passport for the remainder of your journey.
* There are random checks at the boarding gates. If you encounter these, just present your Canadian passport.