The original letters patent were to heirs male, but after the death of Marlborough's only son shortly afterwards, Parliament passed the Duke of Marlborough Annuity Act 1706 which allowed his daughters and their heirs male to inherit, and failing that, the daughters of his daughters and their heirs male, and so forth. I have been unable to find the original wording of the Act, but Cracroft's Peerage says:
On 21 Dec 1706 he obtained
an Act of Parliament settling the succession to his English peerages, together
with the Manor of Woodstock and the Palace of Blenheim, failing the heirs male
of his body to his daughters Henrietta (wife of Hon Francis Godolphin, later
2nd Earl of Godolphin), Anne (wife of Charles [Spencer], 3rd Earl of Sunderland),
Elizabeth (wife of Scroop [Egerton], Earl of Bridgewater) and Mary (wife of John
Montagu) in succession and the heirs male of their bodies; failing which
to any other daughter yet to be born and the heirs male of her body; failing
which to his grand-daughters (starting with the daughters of his eldest daughter,
Lady Henrietta Godolphin) in succession and the heirs male of their bodies; and
lastly "to all and every other the issue male and female, lineally descending
of or from the said Duke of Marlborough, in such manner and for such estate as
the same are before limited to the before-mentioned issue of the said Duke, it
being intended that the said honours shall continue, remain, and be invested in
all the issue of the said Duke, so long as any such issue male or female shall
continue, and be held and enjoyed by then severally and successively in manner
and form aforesaid, the elder and the descendants of every elder issue to be preferred
before the younger of such issue." On his death the Scottish Lordship
of Churchill of Eyemouth (and presumably the Principality of the Holy Roman Empire,
as this was granted in the usual form which does not allow for the dignity to pass
through daughters) became extinct
It is the final provision "to all and every other issue" that would see the princes inherit the dukedom, but as I read it, only after all the direct male descendants of the 3rd Duchess, and the male descendants of all the 3rd Duchess's female descendants in earlier generations. So while the royal princes are in the remainder, they are a very long way further down the line of succession than Earl Spencer.