Well, Pokemon, as one would expect, is influenced by Japanese culture. The shrines also tend to be associated with legendary Pokemon, like celebi or landorus, who have great influence on nature and spirit. Similarly, in Shintoism, moderately sized wooden structures are built to enshrine kami, spirits of great importance in regards to spirituality or natural phenomena. As such, the presence of shrines in the Pokemon games is likely influenced by or a homage to Shintoism. There are likely other sources of inspiration in addition to this.
Hope this helped.