I have recently started using Illustrator to make artwork for Print on Demand sites like Society6, RedBubble, etc. When creating the file, I set it in pixels - say 10,000 x 10,000 pixels at 300 DPI. Most POD sites state that the DPI needs to be at 300 DPI or the resultant products can have blurry artwork. However, when I try to export this file as jpeg or png (quality set to high and resolution at 300DPI), I get an error saying "unable to export at this resolution. Please lower resolution and try again". Can someone help as to why this would be? I have used Affinity Designer in the past and never had any such issue. What do I need to do differently? Also, since I am designing in vector, would the DPI matter when exporting?
Likely you're simply running out of memory. Also you seem to have a misunderstanding here. Internally AI always operates based on inches. Any pixel calculations therefore can result in insane values and 33" is pretty huge, especially in both dimensions. If nothing else, you could always run into a fixed size limit somewhere. The rest is just AI's terrible memory management. You might indeed wanna consider "designing to spec" rather than creating unnecessarily large artwork. Other than that consider upgrading your hardware. Having more RAM may help to avoid such errors.
If you want to export an image in the dimensions 10000x10000 pixels, then you have to export it at 72 ppi.
Actually the ppi doesn't matter at all. Pixel dimensions is what matters, but those POD websites fail to explain that part to their customers unfortunately. Most probably they even delete the ppi information from your image when you upload it to their website. It's just metadata.