I don't think there are rules explicitly for this, but I have a suggestion.
Compare Earth Glide (Ex) to Incorporeal (Ex) and borrow some of the "pass through solid objects" restrictions.
- Don't need to remain adjacent to the object's exterior — Earth Glide is clear on this point.
- Can sense creatures directly adjacent.
- In order to see beyond the object it is in and attack normally, the creature must emerge.
Unless the druid has other senses, Earth Glide doesn't let him sense any more than he normally would and being embedded in a wall is somewhat limiting. Likewise, he doesn't have any line of effect to anything (other than the wall or himself) while in the wall.
Officially, the druid can't use wild shape to assume such a form...
The druid supernatural ability wild shape allows the druid to use an effect duplicating the spell elemental body I at druid level 6, II at level 8, III at level 10, and IV at level 12.
The spell elemental body has no provision for elementals other than air, earth, fire, and water. Of the elementals listed on the d20 Pathfinder SRD that I looked at (cold iron, gravity, lightning, time, and, to make sure, positive energy), none address nor alter the spell elemental body.
If the GM allows the druid to take such nonstandard forms and gain such nonstandard abilities, these are house rules, and the GM should make it clear to all players that they are house rules and explain how they work.
Expanding the druid's wild shape abilities in this way is something Pathfinder deliberately shut down in an effort to make druids less powerful, druids having been among the most powerful classes in Pathfinder's antecedent, Dungeons and Dragons 3.5.
...But house rules can make it happen anyway
First, the GM should look at the elemental body spells and provide details as to what effects assuming the elemental body of an nontraditional elemental has. Then the GM can create for the campaign a custom feat, magic item, or spell that allows assuming nontraditional elemental bodies. (However, unless the abilities granted by the nontraditional elementals are vastly superior to the traditional, once the details are hashed out, it's perfectly reasonable for mere familiarity (as suggested by GnoveltyGnome's now deleted answer) to be sufficient for assuming those forms.)
Best Answer
Not with the intent to send them to an elemental plane.
Wild Shape, as it pertains to elementals, is the equivalent of Elemental Body. In this spell, you assume the form of an elemental, you do not fully become one. You remain planar, as your origin is still in the default plane, regardless of the form you assume.