How to get the SMILES of all compounds on PubChem? I would like to download all the compounds from ChEMBL and PubChem. For ChEMBL this is easy using their webUI. Nevertheless, for PubChem, it isn't clear how to download all the compounds on the database including their SMILES representations.

I am also not sure how pubchem has 33,000,000 compounds where ChEMBL has "only"  2,000,000.
The best way to download bulk data from PubChem is actually FTP, as documented in their documentation.

For example, if you want the unfiltered SMILES of every CID in PubChem, the URL is ftp://ftp.ncbi.nlm.nih.gov/pubchem/Compound/Extras/CID-SMILES.gz

You can also download subsets using the PubChem Structure Download service

And as mentioned above, there are Python and other tools to access both PubChem and ChemSpider through their documented web APIs.