Probably not, but there's enough gray area to allow it.
There are two requirements for the Unicorn Spirit's benefit to trigger:
- The druid must cast a non-cantrip spell
- That spell must restore HP to a creature
Goodberry is a level one spell, which satisfies the first condition but it does not restore HP to any creature. It creates berries.
HP are not restored by the spell's casting. That requires another creature to use their action and consume the berries. Another way of looking at it: if the druid casts Goodberry and no one consumes a berry, then condition number 2 above is not met.
That said, the the wording of the Unicorn Spirit reads "if" not "when." This nuance creates a gray area that could allow a DM could to rule that the combination works but the Unicorn Spirit's affect does not trigger unless/until a berry (probably just the first) is consumed.
After all, letting the first berry trigger the Spirit's affect would still be balanced compared to casting a different level one (or higher) healing spell. To allow it to trigger off every berry's consumption would definitely not be.
RAW, only the caster needs a clear path to the target
Based on your quote on spell targeting, RAW, it would appear that you must be the one to have the clear path to the target, since you're the one doing the targeting; the Wildfire Spirit is just where the spell originates from once cast, and apparently does not require a clear path.
This is probably because, when such rules were written, there was no way to cast a spell from somewhere else (except via a familiar, but only with Touch spells, so that already took care of itself), since to have a clear path to target the target would also result in a clear path for the spell you just cast to reach the target.
Odd scenarios arising from this RAW reading
However, this leads to odd scenarios whereby your Wildfire Spirit could be blocked from your target (say, it's in a room, whilst you and your target are in a corridor just outside the room), and yet, you could cast something such that the spell originates from the Wildfire Spirit going through the obstruction at the target that you have a clear path to but your Wildfire Spirit does not (i.e. the target has total cover from the Wildfire Spirit).
For example, say you cast thorn whip at the target in the corridor whilst your Wildfire Spirit was still in this other room, which would then appear to leap out of the wall from the target's perspective, presumably then pulling the target into the wall.
The rules on cover (PHB, p. 196) says (bold italics emphasis mine):
A target can benefit from cover only when an attack or other effect originates on the opposite side of the cover.
[...]
A target with total cover can't be targeted directly by an attack or a spell, although some spells can reach such a target by including it in an area of effect.
So that first part of the quote implies that the "thorn whip through a wall" thing wouldn't happen, since the effect of thorn whip originates from the other side of the wall, but rather the thorn whip would just slam into the wall inside the room where the Wildfire Spirit is instead.
However, the second part of the quote that describes what total cover actually means talks about "targeting" again, simply stating that you can't be "targeted" by a spell, but if the druid and the target in the corridor have a clear path, then it can be targeted. That implies that, RAW, the odd thorn whip thing can happen after all, even though this certainly isn't RAI (Rules As Intended) or RAS (Rules As Sensible).
How to rule this sensibly as DM
It seems as though a DM would need to adjudicate this based on common sense. In other words, it's likely that for this to work, a DM could require both you and the Wildfire Spirit to have a clear path to the target; you to target it, and the Wildfire Spirit so that the spell's effect could plausibly reach the target.
However, this wouldn't matter as much if the spell itself didn't require a direct path (at least from a narrative perspective), such as frostbite, since I, at least, don't imagine that spell as having particle effects flying out of your hand and onto the target in the same way that I imagine ray of frost would look (although in that case, why bother making the spell originate from your Wildfire Spirit in the first place?).
Ultimately, it's up to the DM to make sense of this on a case-by-case basis.
Best Answer
Rules As Written, yes. But it seems unintended
Rules As Written yes, the feature states:
Strictly just reading this you can add it to any roll of the spell, which would include the attack roll. But remember that this is from Unearthed Arcana and so is not as heavily edited and playtested as other material/rules/features.
Compare it to the the Draconic Sorcerer's Elemental Affinity feature:
And then to the Guided Strike feature of the Cleric:
Note that the feature here could not have used either of these wordings as healing spells have neither attack rolls nor damage rolls. It seems likely (and balanced) that this would add to either the damage roll or the healing roll, especially because things are explicit when they can be used to add to an attack roll, such as Bardic Inspiration:
As user @RyanThompson pointed out there is the Alchemical Mastery UA feature of the Revised Artificer which is an example of wording that does apply to only healing and damage rolls: