Normally the answer is no (I just tried naming one of my PCmon bad words and it kept saying "You can't enter that word"). The reason I say normally, is because ironically enough, you can get around GAMEFREAK's censorship really easily if you either misspell the word, or just add an extra character in the middle of the bad word. It does have to be in the middle of the word as opposed the the front or the end, otherwise you just get blocked like normal
In other words, the name has to match the censored word exactly to be blocked (I think).
(Bulbapedia has a list of all the words censored in Gen V although I don't know how much the list or the censoring algorithm has changed since then, nor do I care enough about naming Pokémon insulting words to try and look for the them all)
For example, if you take a look at this Arceus I recieved an Arceus via Wonder Trade a few months ago, it actually has a period in the middle of the swear word and as a result, the game not only allows the player to go ahead with naming it, but apparently has allowed the original trainer to name themselves it too: https://imgur.com/gallery/ow8mHlH
(I kept it for a little while, but eventually released it since I wasn't comfortable with the idea of using it online.)
I'm not telling you this so you can go cuss out all your opponent with Pokémon named with swear-words that all know the move Curse (lol) but as a bit of interesting knowledge. I take zero responsibility for you if you happen to get it trouble doing this