Having driven the 520d, it’s a good car to drive, it has plenty of torque..since Its gonna be a used one just dont buy any N47 engined early 520ds as they have timing chain problems,make sure you check the m/f year.
Seats in the base model are really terrible..find a car with lumbar support,sport seats if you can,however the ride is fairly good.. back seat leg space is average.
No idea about the a6.
Since ‘13 520d s are gonna be in 9mil and up ,it would be wise to get a new 318i(if you can find one cheap). And avoid issues with these older german cars.