There are few problems with this approach.
Lerp doesn't magically go slowly from first to the second value, it just returns a float value. You call Lerp only once, so you can't expect it to change speed gradually. Rather than that, it takes first and second value, and linearly interpolates between them by third argument (for eg. 0f, 5f, 0.3f will return 1.5f).
The second issue is, that the coroutine waits for 0.5 sec, and then executes the code. So again, you haven't ever specified you want to do that multiple times over many steps. Mixing lerp and waiting mechanism like that just won't produce desired result.
What you want to do is insert the loop into your coroutine and wait for some smaller amount of time after every step:
int steps = 20;
for (int i = 1; i < steps + 1; i++)
{
idleSpeed = Mathf.Lerp(velocity.x + velocity.z, idleMoveSpeed, i * 1f / steps);
yield return new WaitForSeconds(0.5f / steps);
}
I multiplied i by 1.0f, so it becomes a float, otherwise the division would yield 0 most of the time.
As always, you could use lerp inside an update method or use async/await with similar result.