The simplest answer (as with most contradictions in Rashi's commentary) is that Rashi did not make up these ideas. In each case he is quoting a midrash, and the two midrashim are not necessarily in agreement. The comment in Bamidbar is based on a midrash in Bereishis Rabba, while the comment in Devarim is based on a midrash in Sifrei.
However, we can still address this specific question to see whether there is even a contradiction to begin with. To do this it is helpful to see the exact text. Rashi in Devarim says:
לפיכך הקדים זבולן ליששכר שתורתו של יששכר על ידי זבולן היתה
Therefore, Zevulun preceded Yissaschar [in the order of the blessings]
because the Torah of Yissaschar was on account of Zevulun.
Note that Rashi does not say "Zevulun’s ability to finance Yissachar’s Torah learning was more important".
In Bamidbar Rashi states:
שבשביל שני דברים זכה להקריב שיני לשבטים אחת שהיו ידועים בתורה שנאמר
ומבני יששכר יודעי בינה לעיתים ואחת שהם נתנו עצה לנשיאים להתנדב קרבנות
הללו
Due to two things he merited to bring the offering second of the
tribes: 1. They [the tribe of Yissaschar] were knowledgeable in
Torah, as it says "and from the children of Yissaschar were knowers of
the wisdom of the times". 2. They gave advice to the tribal
leaders to donate these offerings.
Here Zevulun is not mentioned at all, and there are two reasons given for Yissachar's precedence. Therefore, one could argue that it was only the combination of the two reasons that gave them precedence over Zevulun, but their Torah knowledge alone would not have. Alternatively one can simply say that since neither source discusses the relative importance of studying vs financing, there may simply be different criteria for precedence by blessings and by offerings. In one case financing is deemed to have precedence while in the other case studying is deemed to have precedence.
Now one could still ask why the criteria for blessings and offerings have different orders of precedence. Of course, we could simply answer that God's calculations are unknown, and be done. However, I think we can suggest a difference:
There are two different measurements involved. There is the measurement of sechar (Divine reward) that one receives for keeping the Torah, and there is the measurement of how we must relate to people in this world.
When it comes to sechar, the Talmud lays down the following principle:
Bava Basra 9a
א"ר אלעזר גדול המעשה יותר מן העושה
R. Eleazar said: He who causes others to do good is greater than the
doer (Soncino translation)
That "greater than" refers to reward is evident from Rambam's codification of this in Hilchot Matnot Aniyim 10:6
הכופה אחרים ליתן צדקה ומעשה אותן שכרו גדול משכר הנותן שנאמר והיה מעשה
הצדקה שלום ועל גבאי צדקה וכיוצא בהם אומר ומצדיקי הרבים ככוכבים
A person who compels others to give charity and motivates them to do
so receives a greater reward than the person who actually gives, as
[alluded to by Isaiah 32:17]: "And the deed of charity is peace."
With regard to the collectors of charity and the like can be applied
[the words of praise, Daniel 12:3]: "Those who bring merit to the many
are like the stars." (Touger translation)
Thus it would seem that in terms of reward, financing Torah surpasses studying Torah, and therefore when it comes to the Divine blessings that are received Zevulun is greater than Yissaschar.
However, when it comes to relating to people in this world, we have a law that demands that honor be given to Torah scholars. Part of this honor is that Torah scholars come first. (See e.g. Horayot 13a)
Therefore, when it comes to bringing the offerings, the Torah scholars must be honored and therefore Yissaschar comes first, even though in terms of sechar studying Torah might not be better than financing it.