The source for [at least one of] the Shins on the tefillah shel rosh is the Gemara (b.Menahoth 35a):
ואמר אביי שי"ן של תפילין הלכה למשה מסיני וצריך שיגיע חריץ למקום התפר רב דימי מנהרדעא אמר כיון דמנכר לא צריך
Translation: "And Abayye said, [the] Shin of the tefillin is a halakhah le-Mosheh mi-Sinai and its slit needs to reach to the place of the stitching. Rav Dimi of Neharde`a said, as long as it is recognizable it does not [need to reach all the way to place of the stitching]."
Rashi says there:
Shin of the tefillin - On the outer compartment we make creases, like those made on qalaf, and they appear to be in the shape of a Shin. Its slit needs to reach - Which is between one compartment and another until the place of the stitching below, that is to say, until the place where it rests, which is the titura. As long as it is recognizable - If the slit is slightly above [the stitching], [it is fine,] it does not need to reach [all the way] to the stitching.
(See also the Mussaf Rashi and the Shittah HaMequbesseth there)
The Tosafoth, however, says there (second Tosafoth on "Shin shel tefillin"):
The Shin of the tefillin is a halakhah le-Mosheh mi-Sinai - It is written in Shimmusha Rabbah regarding tefillin that they have the shape of a Shin; a three-headed one on the right and a four-headed one on the left. And if the sides are reversed, it is of no concern to us...
There are several items to note here:
[a] The statements in the Gemara do not seem to lead to the interpretation of the ba`alei Tosafoth via the Geonic compendium known as "Shimmusha Rabbah" of two shins embossed on the sides. The statement of Abayye is very vague in this regard, but taken in aggregate with Rav Dimi's statement it seems fairly conclusive if one does not have the pre-conceived notion of embossed Shins.
[b] Rashi's comments seem to be a concession to some understanding either of or akin to the Shimmusha Rabbah (cf. "...on the outer compartment..."), but makes it very clear (along with the Mussaf Rashi and the Shittah HaMequbesseth that he does NOT mean a literal Shin but something like creases that can be likened to a Shin but are not a Shin. His comments seem to be a bit inconsistent.
[c] The use of phrases "slit", "creases", "reach to the stitching", et al and the fact that the commentators repeatedly assert that what is on the tefillin is NOT a Shin, but only the "likeness" or shape of a Shin all seem to point to the divisions between the compartments in the tefillah shel rosh and not letters on the outer surfaces.
[d] The wording of the Shimmusha Rabbah (cf. "...and if the sides are reversed, it is of no concern to us...") seems very imprecise for something which is supposedly a halakhah le-Mosheh mi-Sinai.
[e] In light of the discovery of ancient tefillin at Qumran, Masada, Bar Kokhba caves, et al (see here) - that consistently are made the way and do not have Shins embossed on them (neither three nor four-headed) - it would seem that Shins are a much later development based on, but not necessitated by Abayye's statement.
Question: In light of the above, could it be that the "Shin of the tefillin" spoken of by Abayye and Rav Dimi of Neharde`a is really a reference to the pronounced division of the compartments of the tefillah shel rosh and not the practice of embossed Shins on the outer surfaces of it? Does anyone discuss this?