You can't if your form can't, and obviously it replaces your whole character so there's that issue too. But presuming you could (such as a Mind Flayer, Vampire, Hag or Dragon or other spellcasting capable creature). Polymorph doesn't make you incapable of casting spells unless the specific form can't, like a bear.
Right, but you won't be casting *your* spells. Just whatever your form happens to have according to the stat blocks. Even then, as a GM, I'd probably rule that even those spells aren't available since you haven't been in the form long enough to actually "memorize them" so really only innate spellcasting abilities would qualify.