"Time will only tell if..." is somewhat of a fixed "poetic" expression meaning "Only time will tell if...". When you read this sentence strictly, "only" should indeed modify "tell" rather than "time", but the intended meaning is "Only time will tell if..." or "Time only will tell if..."
So while the answer is indeed that "only" modifies "time", this is unusual. Most of the times you can safely assume that "only" in this position modifies the verb:
Only Bob will tell us the secret -> but not Alice.
Bob will only tell us the secret if we give him money.
Alice will only dance but she won't sing.