Under the terms of the agreement, announced Thursday, Esquire Financial is acquiring Signature in an all-stock transaction valued at $348 million.