In terms of how long a disc will last, does it matter what data is stored on a disc (audio or other data files, e.g. programs)?

With DVDs, in principle, no, as saving always takes place using the same format system, with error correction. With CD-Rs, there are a number of recording formats that vary in the depth of their error correction, meaning that differences are possible. Data CD-Rs use error recognition and error correction procedures that audio CD-Rs do not possess. The data itself plays no role.