First, a nit-pick.
The communed-ed questions as-written are inappropriate for the spell, since neither are yes/no questions. However, they're relatively easily turned into:
- Will we win the Shoggoth War?
- What word will I write on this paper tomorrow?
... both of which are yes/no. Some may argue that question 1 is ambiguous ("who is 'we'?" and "how do you define 'win'?"; I appreciate that, and will address that later; in the interim, let's assume that 1 is sufficiently unambiguous).
So, on to the questions in the OP.
Assuming it's not the case that future "information[...] lies beyond the deity’s knowledge", would this divination method permit arbitrarily long future-sight?
No. Or, perhaps, "not necessarily". There is a vast difference between having knowledge of what will happen in 10 minutes and 10 years.
In the lore of virtually every TTRPG I've played in or heard about, the future is unwritten (some horror stories about heavy-handed railroading notwithstanding). Or, at least, the book of the future is only revealed one page at a time. Deities may be able to peek at the next page, but they are rarely able to read the next chapter. Even deities of prophecy typically see only glimpses of the pages to come.
This is the only option, really, that makes sense in the real world: if the gods know how everything is going to turn out, then the game world is one in which there is no free will in-game, thus the players have no real agency. In-world: if the gods know how everything is going to turn out, why bother with any plans that fail? Put another way: if everything is pre-determined, you're not playing a game but are writing a book.
Even if the future were uncertain to the gods past a certain point, couldn't Eric the Cleric of Yog-Sothoth at least employ this method of communion to see as far into the future as the gods can?
No. The second question's answer can be "yes", "no", or "unclear" (or a short phrase that largely means the same thing). Only the "unclear" result would meaningfully apply to an event past the deity's foresight.
The cleric may, though, be able to determine how far into the future the deity can see.
Let's say that the Shoggoth War will last for 12 days, but that Yog-Sothoth can only reliably see 10 days into the future. When the cleric casts the spell, Yog-Sothoth doesn't know how the answer to the first question, nor do they know what the answer will be tomorrow. Thus, day 1 will see answers of "unclear" and "unclear". Similarly on day 2: the end of the war is now 11 days out, so the answers are again "unclear" and "unclear". On day 3, the end of the war is now 10 days out, so Yog-Sthoth can now see it; the answers become "yes" and "yes". The answers remain the same through the end of the war, so the cleric can assume that Yog-Sthoth's foresight is about 10 days.
We're into house-rule territory here, but I tend to run prophesying divination spells like this as carrying an implicit probability component, usually relying on the PCs to change the future. Thus, my answer to question 1 would be "only with your help" rather than a straight "yes/no/unclear".
Is any of this information useful?
Uncertain, but probably "no". There's no particular reason to assume that Yog-Sothoth can always and only see 10 days into the future. Perhaps he can see 8 days reliably, at which point victory is assured even though the mop-up will take some time. Perhaps he can see 10 days for events in which he is personally involved (ie., where he's nudging things behind the scenes) but not at all for other events (eg., if another deity is quietly gathering forces to assault Yog-Sothoth's sanctum, he might still be blind-sided depending on the assaulting force's operational security).
There's also the ever-popular question in time travel stories about whether and how knowledge of the future affects decisions in the present. Does the fact that the PCs know that they'll win the Shoggoth War mean that they become complacent, thus not being in the right place at the right time, thus causing the war to be lost?
And, there's the question I mentioned earlier: is question 1 sufficiently unambiguous? More broadly: is it possible to word question 1 so that it is sufficiently unambiguous? I would argue that the answer is "no". In this particular case, the party's definition of "we" and "win" may be sufficiently different to Yog-Sothoth's that the latter can reasonably answer "yes" even if the PCs think the war is lost (perhaps Yog-Sothoth is taking an extremely long view, that the Shoggoth War is a constant, ongoing event that will only end with the death of the universe, at which point he'll declare victory).
But, why, though?
Because dice resolve questions of uncertainty, and the dice can be fickle; thus, the gods must answer such questions probabilistically. If a party of 20th level adventurers full to the brim with legendary magic items and artefacts cast commune to ask whether they would survive an encounter with a random goblin (straight out of the monster manual), the GM would almost certainly answer "yes" even though it's theoretically possible (albeit vanishingly unlikely) that the goblin could emerge victorious (possibly via dirty tricks). Thus, the only actual answer to any question about the future is "uncertain", but that's quite boring - even frustrating - at the table. So, I - and, I daresay, most GMs - resolve such questions probabilistically whether they think they do or not: if the odds are, say, 90% for or against, answer "yes" or "no"; otherwise "uncertain" (or the short phrase).