DO NOT spray WD-40 on shoes that are suede, nubuck, or cloth/canvas. There is a definite risk of staining, and it can screw up the nap.
Also, if the problem is that the layers comprising the bottom of the shoe are not properly bonded together (something that happens more often than it used to) they’ll rub against each other and chirp like cricket legs. The only way to fix that would be to pry everything apart and refasten it - AND I DO NOT RECOMMEND THAT unless the soles are already separating.
Putting soles like that back together isn’t something we relish at Ye Olde Cobbler Shoppe where I work, it would be difficult even for experienced shoe repair people to replicate the original look so I don’t recommend it for amateurs. Like I said, if you were already having a situation involving peeling or major separation and we’d be going in for repairs anyway we’d reglue everything but we don’t want to go into an intact sole for what is most likely annoying air bubbles trapped inside.