Universal replication of chaotic characteristics by classical and quantum machine learning