The Mongodump documentation specifies you can dump using a specific query
i.e.
mongodump --host localhost --db mydb --collection testCollection --que
You don't need to escape that much. You may just use single-quote outside of the query and double-quote inside, i.e. But beware to have the type as hex, meaning "03" and not "3"
mongodump --host localhost --db test --collection bd --query
'{"_id" : { "$binary" : "ryBRQ+Px0kGRsZofJhHgqg==", "$type" : "03" } }'