Careful said:
consider the series
\sum_n n (g - 1)^n
where you are interested in the behavior of this function in a neighborhood of zero. Your argument would be, there is no such unique function, since many C^{infinity} functions could give rise to this formal power series. However, you might introduce another parameter s and consider
\sum_ n n^{-s} (g - 1)^n then for Re(s) > 1, this function is a legitimate power series expansion for an analytic function (this is similar to the trick of dimensional regularization invented by 't Hooft). Now, we want to have this nonperturbative expression A(s,g) and analytically continue to s = -1 if possible.
Sure, but nobody forbids you to apply such trick twice no ? Do you have any legitimate objections against that ?
If you can do this, it just defines _one_ of the possible functions f(g).
How do you know that it picks the right one among the infinitely many possible ones?
Nobody forbids you to regularize sum_n a_n (g-1)^n by considering instead
sum_n a_n phi(n)^{-s} (g - 1)^n
with an arbitrary function phi(n) asymptotically equivalent to n up to bounded factors,
sum it, and analytically continue it to s=0 if possible.
Do you always get the same answer? If not, why should you trust the choice phi(n)=n more than any other choice?
The reason one can trust zeta regularization for computing the a_k in QFT lies deeper.
In perturbative QFT, under appropriate conditions, it is known that the coefficient a_k is
defined by a certain renormalization limit which must exist if the theory is to make sense at not too high energies (the results cannot depend on the large energy behavior);
hence all mathematically justified ways of obtaining that limit are equivalent. One
therefore knows that zeta regularization must produce this limit, too.
(The same happens in your example: The sum equals (g-1)/(2-g)^2 in some local
sector with apex g=0; so you only need the assumption of continuity of your function
to get the value -1/4. Zeta regularization therefore yields the same limit.
But consider instead the series sum_n n! (g - 1)^n, which looks more like QFT series.
Now you can't perform zeta regularization!)
Unfortunately, there is no such result that would ensure a limit representation of the
QFT perturbation series. There is no known nonperturbative, physically motivated definition of the function f(g) whose power series is the perturbation series
sum_k a_k g^k. Purely mathematical recipes are inherently ambiguous; one needs
additional properties to select the right one.
In lower dimensions, Borel summation often works, and a proof that the nonperturbative QFT produces the Borel summation of the perturbation series (and not one of the infinitely many alternatives) is available (only) in some cases of 2D QFT. But the Borel summation breaks down for QED because of renormalon effects related to the Landau pole.
In any case, even if some regularization method would produce a finite result for a QED
perturbation series, one needs, for every particular way to define the sum, additional reasons or experiments that prove that this is the definition Nature obeys. For there are infinitely many other qualifying functions that match theory as currently developed.