There is no undefined behavior if T is trivially copied, which, of course, is POD. vector<T>::data guaranteed to return a pointer to a continuous array of vector<T>::size T s, and the object representation of a trivially copied type T guaranteed as a continuous sequence of sizeof(T) bytes (possibly including internal upholstery).
If the bytes that you store in this space are not allowed T represent objects, you can get undefined behavior when accessing them. Exactly what byte sequences represent the actual representation of the object T is a slightly gray area; at least you should be able to portablely write the base bytes of an object of a trivially copied type to a file and successfully read them back into the base bytes of an object of the same type.
For paranoia, I would probably put:
static_assert(std::is_trivially_copyable<T>(), "NO NO NO - T MUST BE TRIVIALLY COPYABLE!");
before file.read for future verification.
source share