The purpose of key stretching is to increase the strength of the resulting output keying material, compared with the input keying material. The input of the keying material is of course generally a password. If the strength of the keying material is already high enough then there is not need to stretch the keys.
Note that the word "length" is in this case a bit of a misnomer. "This is a very secure password" is obviously not a very strong passphrase, even though it probably exceeds the length requirements of many (badly programmed) systems.
PBKDF2 also has a salt component to it which makes it possible to derive keys that also depend on a unique salt, which makes sure that if it is used multiple times with a different salt that it produces different keys. This is an advantage of PBKDF2 against a secure hash.
It seems that you want to use SHA-256 for deriving keys however. For this purpose there are other algorithms that are closely related to PBKDF's: KBKDF's.
A PBKDF is an algorithm where a key is derived from a password, while KBKDF's derive directly from a key that already has enough strength. The strength of the input key is directly transferred to the output keying material (to a certain high maximum, depending on the KBKDF algorithm that is chosen).
As with PBKDF2 it is not required that the randomness in the input keying material is well distributed, so it could for instance be the output of an asymmetric calculation that doesn't provide this distribution.
KBKDF's have some advantages over secure hashes, as they have been especially designed for this functionality:
- they can use additional diversification data, e.g. the ASCII encoding of "ENC" and "MAC" to derive multiple keys;
- they often have an input parameter for a salt;
- they often have a configurable output key length;
- they can be implemented in cryptographic hardware where the input / output key are kept inside the hardware, without being exposed to the outside world.
The most modern, standardized KBKDF is HKDF, which itself is based on HMAC, and HMAC in turn is based on - you'd guess it - a (reasonably) secure hash.
You could use PBKDF2 as a poorly designed KBKDF, and similarly you could use a hash yourself to create a poorly designed KBKDF. But I'd just use HKDF. It would seem from the question that you'd need the full HKDF by the way, HKDF-extract and -expand.
If you're faced with a direct choice of using a PBKDF2 with SHA-256 over SHA-512, I would say that it doesn't make too much of a difference, especially if you can set the iteration count to 1. I'd choose PBKDF2 as it was at least designed for this purpose and you can tweak it with a salt and generate as many output bits as required, using a standardized algorithm.
That would however be after indicating that a KBKDF should be used instead.