Don't even think about it, go for the 530d. The 520d and 525d are great cars but if you're coming from something with a bit more oomph you'll always feel you are mising something (I went to the 530d from an E92 330Ci).
BTW definitely add the Adaptive Drive and try out Sport + mode