Osculating spaces and diophantine equations (with an Appendix by Pietro Corvaja and Umberto Zannier)