A real estate investment trust with ties to The Hampshire Cos. has purchased retail centers in Pennsylvania and Virginia, marking its first deals after an initial public offering.